Cleanup compiler warnings
authorGeorge Nash <george.nash@intel.com>
Wed, 1 Jun 2016 22:05:49 +0000 (15:05 -0700)
committerJon A. Cruz <jon@joncruz.org>
Thu, 9 Jun 2016 08:02:01 +0000 (08:02 +0000)
ocpayload:
The `tcpPort` was unused in the in the `OCCopyResource` function
The only place the `OCCopyResource` function was called from was
from the `OCDiscoveryPayloadAddNewResource`.
[-Wunused-parameter]

Change-Id: Icb17930e730c8154fbf10d54dd9b5e3857e3e1db
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/8423
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
resource/csdk/stack/src/ocpayload.c

index 8ef4838..b665fa7 100644 (file)
@@ -1394,8 +1394,7 @@ OCResourcePayload* OCDiscoveryPayloadGetResource(OCDiscoveryPayload* payload, si
     return NULL;
 }
 
-static OCResourcePayload* OCCopyResource(const OCResource* res, uint16_t securePort,
-                                         uint16_t tcpPort)
+static OCResourcePayload* OCCopyResource(const OCResource* res, uint16_t securePort)
 {
     OCResourcePayload* pl = (OCResourcePayload*)OICCalloc(1, sizeof(OCResourcePayload));
     if (!pl)
@@ -1500,7 +1499,8 @@ static OCResourcePayload* OCCopyResource(const OCResource* res, uint16_t secureP
 void OCDiscoveryPayloadAddResource(OCDiscoveryPayload* payload, const OCResource* res,
                                    uint16_t securePort, uint16_t tcpPort)
 {
-    OCDiscoveryPayloadAddNewResource(payload, OCCopyResource(res, securePort, tcpPort));
+    OC_UNUSED(tcpPort);
+    OCDiscoveryPayloadAddNewResource(payload, OCCopyResource(res, securePort));
 }
 
 bool OCResourcePayloadAddStringLL(OCStringLL **stringLL, const char *value)