Fixed unused variable static warning
authorShashank Shekhar Shukla <shekhar1.s@samsung.com>
Wed, 30 Mar 2016 05:00:43 +0000 (10:30 +0530)
committerJon A. Cruz <jon@joncruz.org>
Fri, 1 Apr 2016 06:46:48 +0000 (06:46 +0000)
Change-Id: I8dc129a9063b744229fd2ea7b6916e5ae8272a77
Signed-off-by: Shashank Shekhar Shukla <shekhar1.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7455
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
resource/csdk/stack/src/ocpayloadparse.c

index dea9ba4..1f16a20 100755 (executable)
@@ -699,10 +699,10 @@ exit:
 static CborError OCParseArray(OCRepPayload *out, const char *name, CborValue *container)
 {
     void *arr = NULL;
 static CborError OCParseArray(OCRepPayload *out, const char *name, CborValue *container)
 {
     void *arr = NULL;
-    OCRepPayloadPropType type;
-    size_t dimensions[MAX_REP_ARRAY_DEPTH];
-    size_t dimTotal;
-    size_t allocSize;
+    OCRepPayloadPropType type = OCREP_PROP_NULL;
+    size_t dimensions[MAX_REP_ARRAY_DEPTH] = { 0 };
+    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");
     bool res = true;
     CborError err = OCParseArrayFindDimensionsAndType(container, dimensions, &type);
     VERIFY_CBOR_SUCCESS(TAG, err, "Array details weren't clear");
@@ -782,7 +782,7 @@ static CborError OCParseSingleRepPayload(OCRepPayload **outPayload, CborValue *o
 {
     CborError err = CborUnknownError;
     char *name = NULL;
 {
     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");
 
     VERIFY_PARAM_NON_NULL(TAG, outPayload, "Invalid Parameter outPayload");
     VERIFY_PARAM_NON_NULL(TAG, objMap, "Invalid Parameter objMap");