mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-26 06:41:03 +08:00
initialize error in test_security_gssapi.c:test_null_creds
Under some circumstances (which probably no longer apply in master) gcc inlined get_monitor_event into test_null_creds and then emitted a "maybe uninitialized" warning on the use of error. This would only be a problem if the tested code was misbehaving but I guess that's the point of a test!
This commit is contained in:
parent
a6039d8716
commit
aa3e097996
@ -192,7 +192,7 @@ void test_null_creds ()
|
|||||||
expect_bounce_fail (server, client);
|
expect_bounce_fail (server, client);
|
||||||
test_context_socket_close_zero_linger (client);
|
test_context_socket_close_zero_linger (client);
|
||||||
|
|
||||||
int error;
|
int error = 0;
|
||||||
int event = get_monitor_event (server_mon, &error, NULL);
|
int event = get_monitor_event (server_mon, &error, NULL);
|
||||||
TEST_ASSERT_EQUAL_INT (ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL, event);
|
TEST_ASSERT_EQUAL_INT (ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL, event);
|
||||||
TEST_ASSERT_EQUAL_INT (ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH, error);
|
TEST_ASSERT_EQUAL_INT (ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH, error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user