IOT-1583: Removing /W4 warning from resource/c_common.
[platform/upstream/iotivity.git] / resource / c_common / oic_string / test / linux / oic_string_tests.cpp
index 9b023e7..78845f5 100644 (file)
@@ -39,6 +39,8 @@
 #include <oic_malloc.h>
 
 const char SENTINEL_VALUE = 127;
+static const char SENTINEL_CHAR = '?';
+
 TEST(StringTests, StrdupNormalDup)
 {
     char param[] = "This is a normal parameter";
@@ -191,7 +193,7 @@ TEST(StringTests, StrcpyZeroSource)
 // tests a copy where the destination is of length 0
 TEST(StringTests, StrcpyZeroDestination)
 {
-    char target[1] = { (char)0xde };
+    char target[1] = { SENTINEL_CHAR };
     char source[] = "123456789";
     char beforeValue = target[0];
 
@@ -401,7 +403,7 @@ TEST(StringTests, StrcatZeroSource)
 // Tests a cat where the Destination is zero length
 TEST(StringTests, StrcatZeroDestination)
 {
-    char target[1] = { (char)0xde };
+    char target[1] = { SENTINEL_CHAR };
     char source[] = "12345";
     char beforeValue = target[0];