Fix Windows build break
authorDan Mihai <Daniel.Mihai@microsoft.com>
Mon, 15 May 2017 17:59:35 +0000 (10:59 -0700)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Tue, 16 May 2017 14:38:37 +0000 (14:38 +0000)
commitfc67d8d8fa6a067145c5638e4803f9b2f6b05e3b
tree73a221d893b5504fcf2c156f7fcbb1cad18f749a
parent9f217ecae0663a12e0e1489c7988d98b2ad36e10
Fix Windows build break

Verify that the block data ID is smaller than UINT8_MAX, then cast
its value to uint8_t.

Fixes compiler warning/error:

resource\csdk\connectivity\src\cablockwisetransfer.c(893):
error C2220: warning treated as error - no 'object' file generated

resource\csdk\connectivity\src\cablockwisetransfer.c(893):
warning C4267: 'function': conversion from 'size_t' to 'uint8_t',
possible loss of data

scons: *** [out\windows\amd64\debug\resource\csdk\connectivity\src\cablockwisetransfer.obj] Error 2

Change-Id: Iae032d52614cf6d10b8ec229430dddbb6f8ee114
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19927
Reviewed-by: Ibrahim Esmat <iesmat@microsoft.com>
Reviewed-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/connectivity/src/cablockwisetransfer.c