IoTHub raw messaging client sample using MQTT

Dependencies:   EthernetInterface NTPClient mbed-rtos mbed wolfSSL azure_c_shared_utility iothub_client azure_umqtt_c iothub_mqtt_transport

Revision:
15:2f2b3dc3ecb4
Parent:
14:0d0177062483
Child:
22:27faaa37d70f
--- a/iothub_client_sample_mqtt.c	Fri Jul 01 10:44:12 2016 -0700
+++ b/iothub_client_sample_mqtt.c	Mon Jul 18 16:46:16 2016 -0700
@@ -31,7 +31,7 @@
 typedef struct EVENT_INSTANCE_TAG
 {
     IOTHUB_MESSAGE_HANDLE messageHandle;
-    int messageTrackingId;  // For tracking the messages within the user callback.
+    size_t messageTrackingId;  // For tracking the messages within the user callback.
 } EVENT_INSTANCE;
 
 static IOTHUBMESSAGE_DISPOSITION_RESULT ReceiveMessageCallback(IOTHUB_MESSAGE_HANDLE message, void* userContextCallback)
@@ -82,7 +82,7 @@
 static void SendConfirmationCallback(IOTHUB_CLIENT_CONFIRMATION_RESULT result, void* userContextCallback)
 {
     EVENT_INSTANCE* eventInstance = (EVENT_INSTANCE*)userContextCallback;
-    (void)printf("Confirmation[%d] received for message tracking id = %d with result = %s\r\n", callbackCounter, eventInstance->messageTrackingId, ENUM_TO_STRING(IOTHUB_CLIENT_CONFIRMATION_RESULT, result));
+    (void)printf("Confirmation[%d] received for message tracking id = %zu with result = %s\r\n", callbackCounter, eventInstance->messageTrackingId, ENUM_TO_STRING(IOTHUB_CLIENT_CONFIRMATION_RESULT, result));
     /* Some device specific action code goes here... */
     callbackCounter++;
     IoTHubMessage_Destroy(eventInstance->messageHandle);
@@ -148,7 +148,7 @@
                         {
                             messages[iterator].messageTrackingId = iterator;
                             MAP_HANDLE propMap = IoTHubMessage_Properties(messages[iterator].messageHandle);
-                            sprintf_s(propText, sizeof(propText), "PropMsg_%d", iterator);
+                            (void)sprintf_s(propText, sizeof(propText), "PropMsg_%zu", iterator);
                             if (Map_AddOrUpdate(propMap, "PropName", propText) != MAP_OK)
                             {
                                 (void)printf("ERROR: Map_AddOrUpdate Failed!\r\n");