mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Problem: C4267 warning test_spec_pushpull
Solution: Use unsigned char instead of size_t
This commit is contained in:
parent
3cbc7cb0dc
commit
69a6b86310
@ -92,9 +92,9 @@ void test_pull_fair_queue_in (void *ctx)
|
|||||||
rc = zmq_getsockopt (pull, ZMQ_LAST_ENDPOINT, connect_address, &len);
|
rc = zmq_getsockopt (pull, ZMQ_LAST_ENDPOINT, connect_address, &len);
|
||||||
assert (rc == 0);
|
assert (rc == 0);
|
||||||
|
|
||||||
const size_t services = 5;
|
const unsigned char services = 5;
|
||||||
void *pushs[services];
|
void *pushs[services];
|
||||||
for (size_t peer = 0; peer < services; ++peer) {
|
for (unsigned char peer = 0; peer < services; ++peer) {
|
||||||
pushs[peer] = zmq_socket (ctx, ZMQ_PUSH);
|
pushs[peer] = zmq_socket (ctx, ZMQ_PUSH);
|
||||||
assert (pushs[peer]);
|
assert (pushs[peer]);
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ void test_pull_fair_queue_in (void *ctx)
|
|||||||
int second_half = 0;
|
int second_half = 0;
|
||||||
|
|
||||||
// Send 2N messages
|
// Send 2N messages
|
||||||
for (size_t peer = 0; peer < services; ++peer) {
|
for (unsigned char peer = 0; peer < services; ++peer) {
|
||||||
char *str = strdup ("A");
|
char *str = strdup ("A");
|
||||||
|
|
||||||
str[0] += peer;
|
str[0] += peer;
|
||||||
|
Loading…
Reference in New Issue
Block a user