From: Jim Meyering Date: Fri, 11 Jun 2010 09:26:31 +0000 (+0200) Subject: test-sys_socket: avoid set-but-not-used warnings from gcc X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef5acf202788003cdc70813756e173cd6b7dd5a1;p=pspp test-sys_socket: avoid set-but-not-used warnings from gcc * tests/test-sys_socket.c (main): Use "i" and "x", in order to avoid warning about set-but-not-used variables. --- diff --git a/ChangeLog b/ChangeLog index 456a7936d4..726e66abc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-06-11 Jim Meyering + test-sys_socket: avoid set-but-not-used warnings from gcc + * tests/test-sys_socket.c (main): Use "i" and "x", in order to + avoid warning about set-but-not-used variables. + test-xvasprintf: avoid 'const' discard warnings * tests/test-xvasprintf.c (test_xvasprintf, test_xasprintf): Use "const" when assigning from literal strings. diff --git a/tests/test-sys_socket.c b/tests/test-sys_socket.c index badf308b7a..6ea6a7390a 100644 --- a/tests/test-sys_socket.c +++ b/tests/test-sys_socket.c @@ -49,5 +49,5 @@ main (void) x.ss_family = 42; i = 42; - return 0; + return ! (i + x.ss_family); }