coap-http-proxy: cast size_t type in test 63/21563/4
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Thu, 20 Jul 2017 11:17:59 +0000 (13:17 +0200)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Tue, 15 Aug 2017 16:33:22 +0000 (16:33 +0000)
Suppress a warning using clang-3.5

Change-Id: I8c740970a536a3bbc0d3d6d16cd4fe1dc81df6be
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21563
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
service/coap-http-proxy/unittests/CoAPHttpUnitTest.cpp

index 02e5a62..d749e95 100644 (file)
@@ -274,8 +274,9 @@ TEST_F(CoApHttpTest, CHPGetHttpMethod)
 
 TEST_F(CoApHttpTest, CHPGetHttpOption)
 {
-    OCHeaderOption ocOp = {OC_COAP_ID, COAP_OPTION_ACCEPT, strlen(CBOR_CONTENT_TYPE) + 1,
-                            (uint8_t *)CBOR_CONTENT_TYPE};
+    OCHeaderOption ocOp = {OC_COAP_ID, COAP_OPTION_ACCEPT,
+                           static_cast<uint16_t>(strlen(CBOR_CONTENT_TYPE) + 1),
+                           (uint8_t *)CBOR_CONTENT_TYPE};
 
     HttpHeaderOption_t *httpOp;
     EXPECT_NE(OC_STACK_OK, (CHPGetHttpOption(NULL, NULL)));