Fixed discarded-qualifiers warning
authorGeorge Nash <george.nash@intel.com>
Wed, 7 Sep 2016 23:43:28 +0000 (16:43 -0700)
committerRick Bell <richard.s.bell@intel.com>
Fri, 9 Sep 2016 16:41:53 +0000 (16:41 +0000)
by asigning the const pointer type to a non-const pointer type
the code was discarding the const qualifier. Added const key
word to fix warning.

Change-Id: Ided09959ac9406ed80f69606e9ed065d2498ebd2
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11527
Reviewed-by: Larry Sachs <larry.j.sachs@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: jaehyun Cho <jaehyun3.cho@samsung.com>
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
resource/csdk/connectivity/src/adapter_util/cafragmentation.c

index 7870ad5..d8efdbc 100644 (file)
@@ -196,7 +196,7 @@ CAResult_t CAMakeRemainDataSegment(uint8_t *dataSegment,
     VERIFY_NON_NULL(dataSegment, TAG, "dataSegment is NULL");
     VERIFY_NON_NULL(dataHeader, TAG, "dataHeader is NULL");
 
-    uint8_t *cur_pos = data +
+    const uint8_t *cur_pos = data +
         (CA_SUPPORTED_BLE_MTU_SIZE - CA_BLE_HEADER_SIZE - CA_BLE_LENGTH_HEADER_SIZE +
          (index * (CA_SUPPORTED_BLE_MTU_SIZE - CA_BLE_HEADER_SIZE)));
     if (cur_pos == NULL)