From aa3e0979962095e28a69eea4d686448b1d8c9ee0 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Mon, 5 Oct 2020 15:35:45 +1300 Subject: [PATCH] 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! --- tests/test_security_gssapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_security_gssapi.cpp b/tests/test_security_gssapi.cpp index e1f493e9..479ae87c 100644 --- a/tests/test_security_gssapi.cpp +++ b/tests/test_security_gssapi.cpp @@ -192,7 +192,7 @@ void test_null_creds () expect_bounce_fail (server, client); test_context_socket_close_zero_linger (client); - int error; + int error = 0; int event = get_monitor_event (server_mon, &error, NULL); TEST_ASSERT_EQUAL_INT (ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL, event); TEST_ASSERT_EQUAL_INT (ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH, error);