Fix warning and format
authorHabib Virji <habib.virji@samsung.com>
Mon, 12 Oct 2015 16:30:38 +0000 (17:30 +0100)
committerHabib Virji <habib.virji@samsung.com>
Wed, 21 Oct 2015 13:52:14 +0000 (13:52 +0000)
There is wrong format used for types in OIC_LOG_V. Also fixes for the unsed parameters

Change-Id: Ib99c196721877b30b7bc28b673e4734b7378c7b9
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3833
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/csdk/connectivity/src/camessagehandler.c
resource/csdk/connectivity/src/caprotocolmessage.c
resource/csdk/connectivity/src/caretransmission.c

index fd0be7e..fffbc78 100644 (file)
@@ -615,7 +615,7 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
         CALogPDUInfo(pdu, data->remoteEndpoint);
 
         OIC_LOG(DEBUG, TAG, "pdu to send :");
-        OIC_LOG_BUFFER(DEBUG, TAG,  pdu->hdr, pdu->length);
+        OIC_LOG_BUFFER(DEBUG, TAG,  (uint8_t*)pdu->hdr, pdu->length);
 
         res = CASendMulticastData(data->remoteEndpoint, pdu->hdr, pdu->length);
         if (CA_STATUS_OK != res)
@@ -1254,6 +1254,8 @@ void CALogPDUInfo(coap_pdu_t *pdu, const CAEndpoint_t *endpoint)
         OIC_LOG_BUFFER(DEBUG, TAG,  pdu->hdr, pdu->length);
     }
     else
+#else
+    (void) endpoint;
 #endif
     {
         OIC_LOG_V(DEBUG, TAG, "PDU Maker - type : %d", pdu->hdr->coap_hdr_udp_t.type);
@@ -1283,7 +1285,7 @@ static void CALogPayloadInfo(CAInfo_t *info)
 
         if (info->payload)
         {
-            OIC_LOG_V(DEBUG, TAG, "payload: %p(%u)", info->payload,
+            OIC_LOG_V(DEBUG, TAG, "payload: %p(%zu)", info->payload,
                       info->payloadSize);
         }
 
index f62301a..d5f9a3e 100644 (file)
@@ -200,6 +200,8 @@ coap_pdu_t *CAParsePDU(const char *data, uint32_t length, uint32_t *outCode,
         transport = coap_get_tcp_header_type_from_initbyte(((unsigned char *)data)[0] >> 4);
     }
     else
+#else
+    (void) endpoint;
 #endif
     {
         transport = coap_udp;
@@ -726,6 +728,8 @@ CAResult_t CAGetInfoFromPDU(const coap_pdu_t *pdu, const CAEndpoint_t *endpoint,
         transport = coap_get_tcp_header_type_from_initbyte(((unsigned char *)pdu->hdr)[0] >> 4);
     }
     else
+#else
+    (void) endpoint;
 #endif
     {
         transport = coap_udp;
@@ -994,6 +998,8 @@ CAResult_t CAGetTokenFromPDU(const coap_hdr_t *pdu_hdr, CAInfo_t *outInfo,
         transport = coap_get_tcp_header_type_from_initbyte(((unsigned char *)pdu_hdr)[0] >> 4);
     }
     else
+#else
+    (void) endpoint;
 #endif
     {
         transport = coap_udp;
index 2f0995f..125ae10 100644 (file)
@@ -140,7 +140,7 @@ static bool CACheckTimeout(uint64_t currentTime, CARetransmissionData_t *retData
 
     if (currentTime >= retData->timeStamp + timeout)
     {
-        OIC_LOG_V(DEBUG, TAG, "%llu microseconds time out!!, tried count(%d)",
+        OIC_LOG_V(DEBUG, TAG, "%zu microseconds time out!!, tried count(%d)",
                   timeout, retData->triedCount);
         return true;
     }