Skip to content

Commit 97b1b79

Browse files
authored
Update vcpkg SHA to match the C++ repo (#2869)
* Update vcpkg SHA to match the C++ repo * sizeof('x') is 1 in C++, but in C, it is 4 (to be pedantic, it is not 4, but sizeof(int)). See https://stackoverflow.com/questions/2172943/why-is-the-size-of-a-character-sizeofa-different-in-c-and-c Fixes error C2220: the following warning is treated as an error iot_sample_common.c(337): warning C6396: sizeof('integerConstant') always returns the size of the underlying integer type. iot_sample_common.c(354): warning C6396: sizeof('integerConstant') always returns the size of the underlying integer type. --------- Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
1 parent a116c92 commit 97b1b79

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

cmake-modules/AzureVcpkg.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ macro(az_vcpkg_integrate)
1616
message("AZURE_SDK_DISABLE_AUTO_VCPKG is not defined. Fetch a local copy of vcpkg.")
1717
# GET VCPKG FROM SOURCE
1818
# User can set env var AZURE_SDK_VCPKG_COMMIT to pick the VCPKG commit to fetch
19-
set(VCPKG_COMMIT_STRING 8150939b69720adc475461978e07c2d2bf5fb76e) # default SDK tested commit
19+
set(VCPKG_COMMIT_STRING 5312e9f976e89b256954f571433e34f783dd2d12) # default SDK tested commit
2020
if(DEFINED ENV{AZURE_SDK_VCPKG_COMMIT})
2121
message("AZURE_SDK_VCPKG_COMMIT is defined. Using that instead of the default.")
2222
set(VCPKG_COMMIT_STRING "$ENV{AZURE_SDK_VCPKG_COMMIT}") # default SDK tested commit

eng/vcpkg-commit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8150939b69720adc475461978e07c2d2bf5fb76e
1+
5312e9f976e89b256954f571433e34f783dd2d12

sdk/samples/iot/iot_sample_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ void iot_sample_create_mqtt_endpoint(
334334
{
335335
int32_t const required_size = az_span_size(mqtt_url_prefix)
336336
+ az_span_size(env_vars->hub_hostname) + az_span_size(mqtt_url_suffix)
337-
+ (int32_t)sizeof('\0');
337+
+ (int32_t)sizeof((uint8_t)'\0');
338338

339339
if ((size_t)required_size > endpoint_size)
340340
{
@@ -351,7 +351,7 @@ void iot_sample_create_mqtt_endpoint(
351351
else if (type == PAHO_IOT_PROVISIONING)
352352
{
353353
int32_t const required_size
354-
= az_span_size(provisioning_global_endpoint) + (int32_t)sizeof('\0');
354+
= az_span_size(provisioning_global_endpoint) + (int32_t)sizeof((uint8_t)'\0');
355355

356356
if ((size_t)required_size > endpoint_size)
357357
{

sdk/src/azure/core/az_http_policy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ AZ_NODISCARD az_result az_http_pipeline_policy_apiversion(
4848
#define _az_TELEMETRY_ID_PREFIX_LENGTH (sizeof(_az_TELEMETRY_ID_PREFIX) - 1)
4949
#define _az_TELEMETRY_COMPONENT_NAME_MAX_LENGTH 40
5050
#define _az_TELEMETRY_VERSION_MAX_LENGTH (sizeof("12.345.6789-preview.123") - 1)
51-
#define _az_TELEMETRY_ID_MAX_LENGTH \
52-
(_az_TELEMETRY_ID_PREFIX_LENGTH + _az_TELEMETRY_COMPONENT_NAME_MAX_LENGTH + sizeof('/') \
51+
#define _az_TELEMETRY_ID_MAX_LENGTH \
52+
(_az_TELEMETRY_ID_PREFIX_LENGTH + _az_TELEMETRY_COMPONENT_NAME_MAX_LENGTH + sizeof((uint8_t)'/') \
5353
+ _az_TELEMETRY_VERSION_MAX_LENGTH)
5454

5555
AZ_NODISCARD az_result az_http_pipeline_policy_telemetry(

vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "azure-sdk-for-c",
33
"version": "1.0.0",
4-
"builtin-baseline": "8150939b69720adc475461978e07c2d2bf5fb76e",
4+
"builtin-baseline": "5312e9f976e89b256954f571433e34f783dd2d12",
55
"dependencies": [
66
{
77
"name": "curl"

0 commit comments

Comments
 (0)