Unused Variable Warnings removed
authorManoj Gupta <manoj.g2@samsung.com>
Wed, 16 Mar 2016 11:24:02 +0000 (16:54 +0530)
committerJon A. Cruz <jon@joncruz.org>
Thu, 17 Mar 2016 08:30:33 +0000 (08:30 +0000)
Change-Id: Ic9132465481b6ba8f4afb1a3b9a6d38956f3ac30
Signed-off-by: Manoj Gupta <manoj.g2@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5977
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
resource/csdk/stack/src/ocpayloadparse.c

index a89c441..d57ac6c 100644 (file)
@@ -748,8 +748,8 @@ static CborError OCParseArray(OCRepPayload *out, const char *name, CborValue *co
     void *arr = NULL;
     OCRepPayloadPropType type;
     size_t dimensions[MAX_REP_ARRAY_DEPTH];
-    size_t dimTotal;
-    size_t allocSize;
+    size_t dimTotal = 0;
+    size_t allocSize = 0;
     bool res = true;
     CborError err = OCParseArrayFindDimensionsAndType(container, dimensions, &type);
     VERIFY_CBOR_SUCCESS(TAG, err, "Array details weren't clear");
@@ -829,7 +829,7 @@ static CborError OCParseSingleRepPayload(OCRepPayload **outPayload, CborValue *o
 {
     CborError err = CborUnknownError;
     char *name = NULL;
-    bool res;
+    bool res = false;
     VERIFY_PARAM_NON_NULL(TAG, outPayload, "Invalid Parameter outPayload");
     VERIFY_PARAM_NON_NULL(TAG, objMap, "Invalid Parameter objMap");