Commit 106127b5 authored by Simon Giesecke's avatar Simon Giesecke

Problem: C4267 warnings in test_stream_disconnect

Solution: Use size_t instead of int
parent 5ca0d4e8
......@@ -198,14 +198,14 @@ int main (int, char **)
// Make sure payload matches what we expect.
const char *const data = (const char *) zmq_msg_data (&data_frame);
const int size = zmq_msg_size (&data_frame);
const size_t size = zmq_msg_size (&data_frame);
// 0-length frame is a disconnection notification. The server
// should receive it as the last step in the dialogue.
if (size == 0) {
++step;
assert (step == steps);
} else {
assert ((size_t) size == strlen (dialog[step].text));
assert (size == strlen (dialog[step].text));
int cmp = memcmp (dialog[step].text, data, size);
assert (cmp == 0);
......@@ -259,8 +259,8 @@ int main (int, char **)
// Make sure payload matches what we expect.
const char *const data = (const char *) zmq_msg_data (&data_frame);
const int size = zmq_msg_size (&data_frame);
assert ((size_t) size == strlen (dialog[step].text));
const size_t size = zmq_msg_size (&data_frame);
assert (size == strlen (dialog[step].text));
int cmp = memcmp (dialog[step].text, data, size);
assert (cmp == 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment