-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changing mqtt %zu to %d for mbed #33
Conversation
src/mqtt_client.c
Outdated
@@ -664,7 +664,7 @@ static void ProcessPublishMessage(MQTT_CLIENT* mqtt_client, uint8_t* initialPos, | |||
#ifndef NO_LOGGING | |||
if (mqtt_client->logTrace) | |||
{ | |||
STRING_sprintf(trace_log, " | PAYLOAD_LEN: %zu", numberOfBytesToBeRead); | |||
STRING_sprintf(trace_log, " | PAYLOAD_LEN: %d", (int)numberOfBytesToBeRead); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%d", (int) [](start = 63, length = 10)
why cast? Leaving unsigned %u is better. #Closed
src/mqtt_codec.c
Outdated
@@ -819,7 +819,7 @@ BUFFER_HANDLE mqtt_codec_publish(QOS_VALUE qosValue, bool duplicateMsg, bool ser | |||
(void)memcpy(iterator, msgBuffer, buffLen); | |||
if (trace_log) | |||
{ | |||
STRING_sprintf(varible_header_log, " | PAYLOAD_LEN: %zu", buffLen); | |||
STRING_sprintf(varible_header_log, " | PAYLOAD_LEN: %d", (int)buffLen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: %d", (int)b [](start = 82, length = 13)
%u #Closed
src/mqtt_message.c
Outdated
@@ -111,7 +111,7 @@ MQTT_MESSAGE_HANDLE mqttmessage_create(uint16_t packetId, const char* topicName, | |||
if (result->appPayload.message == NULL) | |||
{ | |||
/* Codes_SRS_MQTTMESSAGE_07_003: [If any memory allocation fails mqttmessage_create shall free any allocated memory and return NULL.] */ | |||
LogError("Failure allocating message value of %zu", appMsgLength); | |||
LogError("Failure allocating message value of %d", (int)appMsgLength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%d", (int)app [](start = 70, length = 13)
%u #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.