test-sys_socket: avoid set-but-not-used warnings from gcc
authorJim Meyering <meyering@redhat.com>
Fri, 11 Jun 2010 09:26:31 +0000 (11:26 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 11 Jun 2010 09:26:31 +0000 (11:26 +0200)
* tests/test-sys_socket.c (main): Use "i" and "x", in order to
avoid warning about set-but-not-used variables.

ChangeLog
tests/test-sys_socket.c

index 456a793..726e66a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-06-11  Jim Meyering  <meyering@redhat.com>
 
+       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.
index badf308..6ea6a73 100644 (file)
@@ -49,5 +49,5 @@ main (void)
   x.ss_family = 42;
   i = 42;
 
-  return 0;
+  return ! (i + x.ss_family);
 }