test-sys_socket: mark variables as used more readably
authorJim Meyering <meyering@redhat.com>
Fri, 11 Jun 2010 20:09:27 +0000 (22:09 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 11 Jun 2010 20:09:43 +0000 (22:09 +0200)
* tests/test-sys_socket.c (main): Mark otherwise unused variables
as "used" explicitly via (void) statement casts.  This is more
readable than using them in an artificial return expression.
Suggestion from Bruno Haible.

ChangeLog
tests/test-sys_socket.c

index a64e05c..7b6394d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-06-11  Jim Meyering  <meyering@redhat.com>
+
+       test-sys_socket: mark variables as used more readably
+       * tests/test-sys_socket.c (main): Mark otherwise unused variables
+       as "used" explicitly via (void) statement casts.  This is more
+       readable than using them in an artificial return expression.
+       Suggestion from Bruno Haible.
+
 2010-06-11  Bruno Haible  <bruno@clisp.org>
 
        Avoid some more warnings from "gcc -Wwrite-strings".
index 6ea6a73..1c3b560 100644 (file)
@@ -49,5 +49,9 @@ main (void)
   x.ss_family = 42;
   i = 42;
 
-  return ! (i + x.ss_family);
+  /* Tell the compiler that these variables are used.  */
+  (void) x;
+  (void) i;
+
+  return 0;
 }