From: Martin Schwenke Date: Thu, 6 Sep 2018 06:06:40 +0000 (+1000) Subject: ctdb-tests: Fix CTDB -O3 --picky-developer build on CentOS 7 X-Git-Tag: tdb-1.3.17~1679 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b487979f89cd4dffabfb68b60955ff65de94b02f;p=thirdparty%2Fsamba.git ctdb-tests: Fix CTDB -O3 --picky-developer build on CentOS 7 gcc 4.8.5 complains: [319/381] Compiling ctdb/tests/src/system_socket_test.c ../tests/src/system_socket_test.c: In function ‘test_tcp’: ../tests/src/system_socket_test.c:196:20: error: ‘rst_out’ may be used uninitialized in this function [-Werror=maybe-uninitialized] assert((rst != 0) == (rst_out != 0)); ^ cc1: all warnings being treated as errors Signed-off-by: Martin Schwenke Reviewed-by: Andreas Schneider --- diff --git a/ctdb/tests/src/system_socket_test.c b/ctdb/tests/src/system_socket_test.c index f7d0c7c7701..b3959576b5e 100644 --- a/ctdb/tests/src/system_socket_test.c +++ b/ctdb/tests/src/system_socket_test.c @@ -109,7 +109,7 @@ static void test_tcp(const char *src_str, ssize_t num_written; char src_str_out[64], dst_str_out[64]; uint32_t seq_out, ack_out; - int rst_out; + int rst_out = 0; uint16_t window; int ret;