Commit 04cbc30d authored by Pawel Winogrodzki's avatar Pawel Winogrodzki Committed by Dan Mihai

IOT-1583: Removing /W3 warnings inside connectivity/ (part 3)

Removing the /W3 warnings in order to add the /WX option to prevent new
ones from being added inside the resource/csdk/connectivity/ directory.

Change-Id: Ie1bce977c027e985cd5ba14458d2026b5d391d4f
Signed-off-by: default avatarPawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17549Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarDan Mihai <Daniel.Mihai@microsoft.com>
parent b57e6d0d
......@@ -157,10 +157,10 @@ static void CAReceiveHandler(void *data)
// if new socket object is added in socket list after below logic is ran.
// new socket will be started to read after next while loop
uint32_t length = CAEDRGetSocketListLength();
size_t length = CAEDRGetSocketListLength();
if (0 != length)
{
for (uint32_t idx = 0; idx < length; idx++)
for (size_t idx = 0; idx < length; idx++)
{
CAEDRNativeReadData(env, idx);
}
......@@ -597,7 +597,7 @@ CAResult_t CAEDRStopReceiveThread()
return CA_STATUS_OK;
}
CAResult_t CAEDRNativeReadData(JNIEnv *env, uint32_t idx)
CAResult_t CAEDRNativeReadData(JNIEnv *env, size_t idx)
{
if ((*env)->ExceptionCheck(env))
{
......
......@@ -68,7 +68,7 @@ CAResult_t CAEDRStopReceiveThread();
* @param[in] id index of remote address.
* @return ::CA_STATUS_OK or Appropriate error code.
*/
CAResult_t CAEDRNativeReadData(JNIEnv *env, uint32_t id);
CAResult_t CAEDRNativeReadData(JNIEnv *env, size_t id);
/**
* Start Listen Task.
......
......@@ -788,7 +788,7 @@ void CAEDRNativeRemoveDeviceSocketBaseAddr(JNIEnv *env, jstring address)
return;
}
jobject CAEDRNativeGetDeviceSocket(uint32_t index)
jobject CAEDRNativeGetDeviceSocket(size_t index)
{
if (!g_deviceObjectList)
{
......@@ -864,7 +864,7 @@ jobject CAEDRNativeGetDeviceSocketBaseAddr(JNIEnv *env, const char* remoteAddres
return NULL;
}
jobject CAEDRNativeGetInputStream(uint32_t index)
jobject CAEDRNativeGetInputStream(size_t index)
{
if (!g_deviceObjectList)
{
......@@ -889,7 +889,7 @@ jobject CAEDRNativeGetInputStream(uint32_t index)
return jarrayObj;
}
uint32_t CAEDRGetSocketListLength()
size_t CAEDRGetSocketListLength()
{
if (!g_deviceObjectList)
{
......
......@@ -182,7 +182,7 @@ void CAEDRNativeRemoveDeviceSocketBaseAddr(JNIEnv *env, jstring address);
* @param[in] index index of device list.
* @return Device socket object or NULL.
*/
jobject CAEDRNativeGetDeviceSocket(uint32_t index);
jobject CAEDRNativeGetDeviceSocket(size_t index);
/**
* Get device socket address.
......@@ -197,13 +197,13 @@ jobject CAEDRNativeGetDeviceSocketBaseAddr(JNIEnv *env, const char* remoteAddres
* @param[in] index index of device list.
* @return Input stream object or NULL.
*/
jobject CAEDRNativeGetInputStream(uint32_t index);
jobject CAEDRNativeGetInputStream(size_t index);
/**
* Get length of device socket list.
* @return length of list.
*/
uint32_t CAEDRGetSocketListLength();
size_t CAEDRGetSocketListLength();
/**
* Get device information from list.
......
......@@ -326,7 +326,7 @@ int32_t CASendEDRMulticastData(const CAEndpoint_t *endpoint, const void *data, u
return sentLen;
}
CAResult_t CAGetEDRInterfaceInformation(CAEndpoint_t **info, uint32_t *size)
CAResult_t CAGetEDRInterfaceInformation(CAEndpoint_t **info, size_t *size)
{
VERIFY_NON_NULL(info, TAG, "LocalConnectivity info is null");
......
......@@ -319,8 +319,8 @@ void CAEDRDeviceDiscoveryCallback(int result, bt_adapter_device_discovery_state_
return;
}
int lengthData = u_arraylist_length(g_multicastDataList);
for(int len = 0; len < lengthData; len++)
size_t lengthData = u_arraylist_length(g_multicastDataList);
for(size_t len = 0; len < lengthData; len++)
{
// Adding to pending list
EDRData *multicastData =
......
......@@ -70,8 +70,8 @@ CAConnectedDeviceInfo_t *CAEDRGetDeviceInfoFromAddress(const char *remoteAddress
return NULL;
}
uint32_t length = u_arraylist_length(g_deviceStateList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_deviceStateList);
for (size_t index = 0; index < length; index++)
{
CAConnectedDeviceInfo_t* deviceInfo =
(CAConnectedDeviceInfo_t*) u_arraylist_get(g_deviceStateList, index);
......
......@@ -919,8 +919,8 @@ CAResult_t CALEClientSendUnicastMessageImpl(const char* address, const uint8_t*
if (g_context && g_deviceList)
{
uint32_t length = u_arraylist_length(g_deviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_deviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_deviceList, index);
if (!jarrayObj)
......@@ -1080,14 +1080,14 @@ CAResult_t CALEClientSendMulticastMessageImpl(JNIEnv *env, const uint8_t* data,
goto error_exit;
}
uint32_t length = u_arraylist_length(g_deviceList);
size_t length = u_arraylist_length(g_deviceList);
g_targetCnt = length;
jbyteArray jni_arr = (*env)->NewByteArray(env, dataLen);
(*env)->SetByteArrayRegion(env, jni_arr, 0, dataLen, (jbyte*) data);
g_sendBuffer = (jbyteArray)(*env)->NewGlobalRef(env, jni_arr);
for (uint32_t index = 0; index < length; index++)
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_deviceList, index);
if (!jarrayObj)
......@@ -2645,9 +2645,9 @@ CAResult_t CALEClientDisconnectAll(JNIEnv *env)
return CA_STATUS_OK;
}
uint32_t length = u_arraylist_length(g_gattObjectList);
size_t length = u_arraylist_length(g_gattObjectList);
OIC_LOG_V(DEBUG, TAG, "list length : %d", length);
for (uint32_t index = 0; index < length; index++)
for (size_t index = 0; index < length; index++)
{
OIC_LOG(DEBUG, TAG, "start CALEClientDisconnectAll");
jobject jarrayObj = (jobject) u_arraylist_get(g_gattObjectList, index);
......@@ -2686,8 +2686,8 @@ CAResult_t CALEClientDisconnectforAddress(JNIEnv *env, jstring remote_address)
return CA_STATUS_FAILED;
}
uint32_t length = u_arraylist_length(g_gattObjectList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_gattObjectList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_gattObjectList, index);
if (!jarrayObj)
......@@ -3566,8 +3566,8 @@ bool CALEClientIsDeviceInScanDeviceList(JNIEnv *env, const char* remoteAddress)
return true;
}
uint32_t length = u_arraylist_length(g_deviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_deviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_deviceList, index);
if (!jarrayObj)
......@@ -3620,8 +3620,8 @@ CAResult_t CALEClientRemoveAllScanDevices(JNIEnv *env)
return CA_STATUS_FAILED;
}
uint32_t length = u_arraylist_length(g_deviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_deviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_deviceList, index);
if (!jarrayObj)
......@@ -3655,8 +3655,8 @@ CAResult_t CALEClientRemoveDeviceInScanDeviceList(JNIEnv *env, jstring address)
return CA_STATUS_FAILED;
}
uint32_t length = u_arraylist_length(g_deviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_deviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_deviceList, index);
if (!jarrayObj)
......@@ -3776,8 +3776,8 @@ bool CALEClientIsGattObjInList(JNIEnv *env, const char* remoteAddress)
VERIFY_NON_NULL(env, TAG, "env is null");
VERIFY_NON_NULL_RET(remoteAddress, TAG, "remoteAddress is null", true);
uint32_t length = u_arraylist_length(g_gattObjectList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_gattObjectList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_gattObjectList, index);
if (!jarrayObj)
......@@ -3824,8 +3824,8 @@ jobject CALEClientGetGattObjInList(JNIEnv *env, const char* remoteAddress)
VERIFY_NON_NULL_RET(remoteAddress, TAG, "remoteAddress is null", NULL);
oc_mutex_lock(g_gattObjectMutex);
uint32_t length = u_arraylist_length(g_gattObjectList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_gattObjectList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_gattObjectList, index);
if (!jarrayObj)
......@@ -3882,8 +3882,8 @@ CAResult_t CALEClientRemoveAllGattObjs(JNIEnv *env)
return CA_STATUS_OK;
}
uint32_t length = u_arraylist_length(g_gattObjectList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_gattObjectList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_gattObjectList, index);
if (!jarrayObj)
......@@ -3916,8 +3916,8 @@ CAResult_t CALEClientRemoveGattObj(JNIEnv *env, jobject gatt)
return CA_STATUS_OK;
}
uint32_t length = u_arraylist_length(g_gattObjectList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_gattObjectList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_gattObjectList, index);
if (!jarrayObj)
......@@ -4003,8 +4003,8 @@ CAResult_t CALEClientRemoveGattObjForAddr(JNIEnv *env, jstring addr)
return CA_STATUS_OK;
}
uint32_t length = u_arraylist_length(g_gattObjectList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_gattObjectList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_gattObjectList, index);
if (!jarrayObj)
......
......@@ -1425,8 +1425,8 @@ CAResult_t CALEServerDisconnectAllDevices(JNIEnv *env)
return CA_STATUS_FAILED;
}
uint32_t length = u_arraylist_length(g_connectedDeviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_connectedDeviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_connectedDeviceList, index);
if (!jarrayObj)
......@@ -1873,8 +1873,8 @@ CAResult_t CALEServerSendUnicastMessageImpl(JNIEnv *env, const char* address, co
oc_mutex_lock(g_threadSendMutex);
uint32_t length = u_arraylist_length(g_connectedDeviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_connectedDeviceList);
for (size_t index = 0; index < length; index++)
{
OIC_LOG(DEBUG, TAG, "check device address");
jobject jarrayObj = (jobject) u_arraylist_get(g_connectedDeviceList, index);
......@@ -1997,8 +1997,8 @@ CAResult_t CALEServerSendMulticastMessageImpl(JNIEnv *env, const uint8_t *data,
g_sendBuffer = (jbyteArray)(*env)->NewGlobalRef(env, jni_arr);
CACheckJNIException(env);
uint32_t length = u_arraylist_length(g_connectedDeviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_connectedDeviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_connectedDeviceList, index);
if (!jarrayObj)
......@@ -2098,8 +2098,8 @@ bool CALEServerIsDeviceInList(JNIEnv *env, const char* remoteAddress)
return false;
}
uint32_t length = u_arraylist_length(g_connectedDeviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_connectedDeviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_connectedDeviceList, index);
......@@ -2197,8 +2197,8 @@ CAResult_t CALEServerRemoveAllDevices(JNIEnv *env)
return CA_STATUS_FAILED;
}
uint32_t length = u_arraylist_length(g_connectedDeviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_connectedDeviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_connectedDeviceList, index);
if (jarrayObj)
......@@ -2229,8 +2229,8 @@ CAResult_t CALEServerRemoveDevice(JNIEnv *env, jstring address)
return CA_STATUS_FAILED;
}
uint32_t length = u_arraylist_length(g_connectedDeviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(g_connectedDeviceList);
for (size_t index = 0; index < length; index++)
{
jobject jarrayObj = (jobject) u_arraylist_get(g_connectedDeviceList, index);
......
......@@ -122,8 +122,8 @@ bool CALEIsDeviceInList(const char* remoteAddress,
VERIFY_NON_NULL_RET(remoteAddress, TAG, "remoteAddress is null", false);
VERIFY_NON_NULL_RET(deviceList, TAG, "deviceList is null", false);
uint32_t length = u_arraylist_length(deviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(deviceList);
for (size_t index = 0; index < length; index++)
{
CALEState_t* state = (CALEState_t*) u_arraylist_get(deviceList, index);
if (!state)
......@@ -153,8 +153,8 @@ CAResult_t CALERemoveAllDeviceState(u_arraylist_t *deviceList,
VERIFY_NON_NULL(deviceList, TAG, "deviceList is null");
oc_mutex_lock(deviceListMutex);
uint32_t length = u_arraylist_length(deviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(deviceList);
for (size_t index = 0; index < length; index++)
{
CALEState_t* state = (CALEState_t*) u_arraylist_get(deviceList, index);
if (!state)
......@@ -204,8 +204,8 @@ CAResult_t CALERemoveDeviceState(const char* remoteAddress,
VERIFY_NON_NULL(remoteAddress, TAG, "remoteAddress is null");
VERIFY_NON_NULL(deviceList, TAG, "deviceList is null");
uint32_t length = u_arraylist_length(deviceList);
for (uint32_t index = 0; index < length; index++)
size_t length = u_arraylist_length(deviceList);
for (size_t index = 0; index < length; index++)
{
CALEState_t* state = (CALEState_t*) u_arraylist_get(deviceList, index);
if (!state)
......@@ -239,9 +239,9 @@ CALEState_t* CALEGetStateInfo(const char* remoteAddress,
VERIFY_NON_NULL_RET(remoteAddress, TAG, "remoteAddress is null", NULL);
VERIFY_NON_NULL_RET(deviceList, TAG, "deviceList is null", NULL);
uint32_t length = u_arraylist_length(deviceList);
size_t length = u_arraylist_length(deviceList);
for (uint32_t index = 0; index < length; index++)
for (size_t index = 0; index < length; index++)
{
CALEState_t* state = (CALEState_t*) u_arraylist_get(deviceList, index);
if (!state)
......@@ -254,7 +254,7 @@ CALEState_t* CALEGetStateInfo(const char* remoteAddress,
{
return state;
}
OIC_LOG_V(DEBUG, TAG, "state addr[%s, %d]", state->address, index);
OIC_LOG_V(DEBUG, TAG, "state addr[%s, %" PRIuPTR "]", state->address, index);
}
OIC_LOG_V(DEBUG, TAG, "[%s] doesn't exist in deviceStateList", remoteAddress, length);
......
......@@ -560,7 +560,7 @@ static CAResult_t CALEGetSenderInfo(const char *leAddress,
const uint16_t port,
u_arraylist_t *senderInfoList,
CABLESenderInfo_t **senderInfo,
uint32_t *senderIndex);
size_t *senderIndex);
/**
* get ports related to remote address. It is need because multi application
......@@ -857,7 +857,7 @@ static CAResult_t CALEGetSenderInfo(const char *leAddress,
const uint16_t port,
u_arraylist_t *senderInfoList,
CABLESenderInfo_t **senderInfo,
uint32_t *senderIndex)
size_t *senderIndex)
{
VERIFY_NON_NULL_RET(leAddress,
CALEADAPTER_TAG,
......@@ -868,9 +868,9 @@ static CAResult_t CALEGetSenderInfo(const char *leAddress,
"NULL index argument",
CA_STATUS_INVALID_PARAM);
const uint32_t listLength = u_arraylist_length(senderInfoList);
const uint32_t addrLength = strlen(leAddress);
for (uint32_t index = 0; index < listLength; index++)
const size_t listLength = u_arraylist_length(senderInfoList);
const size_t addrLength = strlen(leAddress);
for (size_t index = 0; index < listLength; index++)
{
CABLESenderInfo_t *info = (CABLESenderInfo_t *) u_arraylist_get(senderInfoList, index);
if (!info || !(info->remoteEndpoint))
......@@ -944,7 +944,7 @@ static void CALEDataReceiverHandler(void *threadData, CABLEAdapter_t receiverTyp
}
CABLESenderInfo_t *senderInfo = NULL;
uint32_t senderIndex = 0;
size_t senderIndex = 0;
//packet parsing
CABLEPacketStart_t startFlag = CA_BLE_PACKET_NOT_START;
......@@ -1032,7 +1032,7 @@ static void CALEDataReceiverHandler(void *threadData, CABLEAdapter_t receiverTyp
bleData->dataLen - (CA_BLE_HEADER_SIZE + CA_BLE_LENGTH_HEADER_SIZE);
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Total data to be accumulated [%u] bytes",
newSender->totalDataLen);
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "data received in the first packet [%zu] bytes",
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "data received in the first packet [%" PRIuPTR "] bytes",
dataOnlyLen);
newSender->defragData = OICCalloc(newSender->totalDataLen + 1,
......@@ -1106,7 +1106,7 @@ static void CALEDataReceiverHandler(void *threadData, CABLEAdapter_t receiverTyp
if (senderInfo->recvDataLen + dataOnlyLen > senderInfo->totalDataLen)
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Data Length exceeding error!! Receiving [%zu] total length [%u]",
"Data Length exceeding error!! Receiving [%" PRIuPTR "] total length [%u]",
senderInfo->recvDataLen + dataOnlyLen, senderInfo->totalDataLen);
u_arraylist_remove(bleData->senderInfo, senderIndex);
OICFree(senderInfo->defragData);
......@@ -1114,7 +1114,7 @@ static void CALEDataReceiverHandler(void *threadData, CABLEAdapter_t receiverTyp
oc_mutex_unlock(bleReceiveDataMutex);
return;
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Copying the data of length [%zu]",
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Copying the data of length [%" PRIuPTR "]",
dataOnlyLen);
memcpy(senderInfo->defragData + senderInfo->recvDataLen,
bleData->data + CA_BLE_HEADER_SIZE,
......@@ -1237,12 +1237,12 @@ static void CALEServerSendDataThread(void *threadData)
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
"Packet info: data size[%d] midPacketCount[%u] remainingLen[%zu] totalLength[%zu]",
"Packet info: data size[%d] midPacketCount[%u] remainingLen[%" PRIuPTR "] totalLength[%" PRIuPTR "]",
bleData->dataLen, midPacketCount, remainingLen, totalLength);
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
"Server total Data length with header is [%zu]",
"Server total Data length with header is [%" PRIuPTR "]",
totalLength);
uint8_t dataSegment[CA_SUPPORTED_BLE_MTU_SIZE] = {0};
......@@ -1434,7 +1434,7 @@ static void CALEServerSendDataThread(void *threadData)
}
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
"Server Sent Unicast Last Data - data length [%zu]",
"Server Sent Unicast Last Data - data length [%" PRIuPTR "]",
remainingLen + CA_BLE_HEADER_SIZE);
}
}
......@@ -1539,7 +1539,7 @@ static void CALEServerSendDataThread(void *threadData)
}
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
"Server Sent Multicast Last Data - data length [%zu]",
"Server Sent Multicast Last Data - data length [%" PRIuPTR "]",
remainingLen + CA_BLE_HEADER_SIZE);
}
#else
......@@ -1613,7 +1613,7 @@ static void CALEClientSendDataThread(void *threadData)
}
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
"Packet info: data size[%d] midPacketCount[%u] remainingLen[%zu] totalLength[%zu]",
"Packet info: data size[%d] midPacketCount[%u] remainingLen[%" PRIuPTR "] totalLength[%" PRIuPTR "]",
bleData->dataLen, midPacketCount, remainingLen, totalLength);
uint8_t dataSegment[CA_SUPPORTED_BLE_MTU_SIZE] = {0};
......@@ -1807,7 +1807,7 @@ static void CALEClientSendDataThread(void *threadData)
}
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
"Client Sent Unicast Last Data - data length [%zu]",
"Client Sent Unicast Last Data - data length [%" PRIuPTR "]",
remainingLen + CA_BLE_HEADER_SIZE);
}
}
......@@ -1915,7 +1915,7 @@ static void CALEClientSendDataThread(void *threadData)
}
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
"Client Sent Multicast Last Data - data length [%zu]",
"Client Sent Multicast Last Data - data length [%" PRIuPTR "]",
remainingLen + CA_BLE_HEADER_SIZE);
}
#else
......@@ -2499,7 +2499,7 @@ static int32_t CASendLEMulticastData(const CAEndpoint_t *endpoint,
* @return ::CA_STATUS_OK or Appropriate error code.
*/
static CAResult_t CAGetLEInterfaceInformation(CAEndpoint_t **info,
uint32_t *size);
size_t *size);
/**
* Read Synchronous API callback.
......@@ -3253,7 +3253,7 @@ static int32_t CASendLEMulticastData(const CAEndpoint_t *endpoint,
return dataLen;
}
static CAResult_t CAGetLEInterfaceInformation(CAEndpoint_t **info, uint32_t *size)
static CAResult_t CAGetLEInterfaceInformation(CAEndpoint_t **info, size_t *size)
{
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
......@@ -3778,13 +3778,13 @@ static void CALERemoveReceiveQueueData(u_arraylist_t *dataInfoList, const char*
VERIFY_NON_NULL_VOID(address, CALEADAPTER_TAG, "address");
CABLESenderInfo_t *senderInfo = NULL;
uint32_t senderIndex = 0;
size_t senderIndex = 0;
u_arraylist_t *portList = u_arraylist_create();
if (CA_STATUS_OK == CALEGetPortsFromSenderInfo(address, dataInfoList, portList))
{
uint32_t arrayLength = u_arraylist_length(portList);
for (uint32_t i = 0; i < arrayLength; i++)
size_t arrayLength = u_arraylist_length(portList);
for (size_t i = 0; i < arrayLength; i++)
{
uint16_t *port = (uint16_t *)u_arraylist_get(portList, i);
if (!port)
......@@ -3825,10 +3825,10 @@ static CAResult_t CALEGetPortsFromSenderInfo(const char *leAddress,
CALEADAPTER_TAG,
"NULL BLE address argument");
const uint32_t listLength = u_arraylist_length(senderInfoList);
const uint32_t addrLength = strlen(leAddress);
const size_t listLength = u_arraylist_length(senderInfoList);
const size_t addrLength = strlen(leAddress);
for (uint32_t index = 0; index < listLength; index++)
for (size_t index = 0; index < listLength; index++)
{
CABLESenderInfo_t *info = (CABLESenderInfo_t *) u_arraylist_get(senderInfoList, index);
if (!info || !(info->remoteEndpoint))
......
......@@ -165,8 +165,8 @@ bool CALEIsDeviceDiscovered(const char * address)
if (g_deviceDiscoveredList)
{
oc_mutex_lock(g_deviceDiscoveredListMutex);
uint32_t arrayLength = u_arraylist_length(g_deviceDiscoveredList);
for (int i = 0; i < arrayLength; i++)
size_t arrayLength = u_arraylist_length(g_deviceDiscoveredList);
for (size_t i = 0; i < arrayLength; i++)
{
char *deviceAddr = u_arraylist_get(g_deviceDiscoveredList, i);
if (0 == strcasecmp(deviceAddr, address))
......@@ -1019,8 +1019,8 @@ CAResult_t CALEGattDiscoverServices(const char *remoteAddress)
if (g_multicastDataList)
{
oc_mutex_lock(g_multicastDataListMutex);
uint32_t arrayLength = u_arraylist_length(g_multicastDataList);
for (int i = 0; i < arrayLength; i++)
size_t arrayLength = u_arraylist_length(g_multicastDataList);
for (size_t i = 0; i < arrayLength; i++)
{
CALEData_t *multicastData = u_arraylist_get(g_multicastDataList, i);
if (NULL == multicastData)
......
......@@ -68,7 +68,7 @@ static CAAdapterChangeCallback g_adapterStateCallback = NULL;
static CAErrorHandleCallback g_errorCallback = NULL;
static void CANFCPacketReceivedCB(const CASecureEndpoint_t *endpoint, const void *data,
uint32_t dataLength);
size_t dataLength);
#ifndef SINGLE_THREAD
static CAResult_t CANFCInitializeQueueHandles();
......@@ -137,7 +137,7 @@ void CANFCConnectionStateCB(const char *nfcAddress, CANetworkStatus_t status)
(void)status;
}
void CANFCPacketReceivedCB(const CASecureEndpoint_t *sep, const void *data, uint32_t dataLength)
void CANFCPacketReceivedCB(const CASecureEndpoint_t *sep, const void *data, size_t dataLength)
{
OIC_LOG(DEBUG, TAG, "IN");
......@@ -160,7 +160,7 @@ void CANFCPacketReceivedCB(const CASecureEndpoint_t *sep, const void *data, uint
OIC_LOG(DEBUG, TAG, "OUT");
}
void CANFCErrorHandler(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLength,
void CANFCErrorHandler(const CAEndpoint_t *endpoint, const void *data, size_t dataLength,
CAResult_t result)
{
OIC_LOG(DEBUG, TAG, "IN");
......@@ -412,7 +412,7 @@ void CANFCDataDestroyer(void *data, uint32_t size)
(void)size;
}
CAResult_t CAGetNFCInterfaceInformation(CAEndpoint_t **info, uint32_t *size)
CAResult_t CAGetNFCInterfaceInformation(CAEndpoint_t **info, size_t *size)
{
OIC_LOG(DEBUG, TAG, "CAGetNFCInterfaceInformation not supported");
if (!info || !size)
......
......@@ -925,7 +925,7 @@ int32_t CASendRAUnicastData(const CAEndpoint_t *remoteEndpoint, const void *data
return dataLength;
}
CAResult_t CAGetRAInterfaceInformation(CAEndpoint_t **info, uint32_t *size)