Skip to content

Commit 698a482

Browse files
committed
c++11 unit tests silent warning fixes proposal.
1 parent fbf5b9d commit 698a482

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/msgpack_cpp11.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ TEST(MSGPACK_CPP11, simple_buffer_array_char)
183183
for (unsigned int k = 0; k < kLoop; k++) {
184184
array<char, kElements> val1;
185185
for (unsigned int i = 0; i < kElements; i++)
186-
val1[i] = rand();
186+
val1[i] = static_cast<char>(rand());
187187
msgpack::sbuffer sbuf;
188188
msgpack::pack(sbuf, val1);
189189
msgpack::object_handle oh =
@@ -214,7 +214,7 @@ TEST(MSGPACK_CPP11, simple_buffer_array_unsigned_char)
214214
for (unsigned int k = 0; k < kLoop; k++) {
215215
array<unsigned char, kElements> val1;
216216
for (unsigned int i = 0; i < kElements; i++)
217-
val1[i] = rand();
217+
val1[i] = static_cast<unsigned char>(rand());
218218
msgpack::sbuffer sbuf;
219219
msgpack::pack(sbuf, val1);
220220
msgpack::object_handle oh =

0 commit comments

Comments
 (0)