diff --git a/test/msgpack_cpp11.cpp b/test/msgpack_cpp11.cpp index 5bf4bdcc..d9ea82ed 100644 --- a/test/msgpack_cpp11.cpp +++ b/test/msgpack_cpp11.cpp @@ -183,7 +183,7 @@ TEST(MSGPACK_CPP11, simple_buffer_array_char) for (unsigned int k = 0; k < kLoop; k++) { array val1; for (unsigned int i = 0; i < kElements; i++) - val1[i] = rand(); + val1[i] = static_cast(rand()); msgpack::sbuffer sbuf; msgpack::pack(sbuf, val1); msgpack::object_handle oh = @@ -214,7 +214,7 @@ TEST(MSGPACK_CPP11, simple_buffer_array_unsigned_char) for (unsigned int k = 0; k < kLoop; k++) { array val1; for (unsigned int i = 0; i < kElements; i++) - val1[i] = rand(); + val1[i] = static_cast(rand()); msgpack::sbuffer sbuf; msgpack::pack(sbuf, val1); msgpack::object_handle oh =