tests: silence some gcc warnings
authorEric Blake <ebb9@byu.net>
Fri, 5 Dec 2008 14:05:31 +0000 (07:05 -0700)
committerEric Blake <ebb9@byu.net>
Fri, 5 Dec 2008 14:12:04 +0000 (07:12 -0700)
* tests/test-getdate.c (LOG) [!DEBUG]: Mark no-op void.
* tests/uniwidth/test-uc_width2.c (finish_interval): Avoid printf
type mismatches.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
tests/test-getdate.c
tests/uniwidth/test-uc_width2.c

index 93dcebffb5ebab973a8a80113fc97c80bd1f8042..7b2fe13986ac7184205bfa35c4682c25ff808bdb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-05  Eric Blake  <ebb9@byu.net>
+
+       tests: silence some gcc warnings
+       * tests/test-getdate.c (LOG) [!DEBUG]: Mark no-op void.
+       * tests/uniwidth/test-uc_width2.c (finish_interval): Avoid printf
+       type mismatches.
+
 2008-12-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
             Bruno Haible  <bruno@clisp.org>
 
index 3433c09fb3c5af593a1a7b439d85a3363acf04da..a5977224ca4bf4894766e14fe236a08f07c87d83 100644 (file)
@@ -43,7 +43,7 @@
   printf ("string `%s' diff %d %d\n",                  \
          str, res.tv_sec - now.tv_sec, res.tv_nsec - now.tv_nsec);
 #else
-#define LOG(str, now, res) 0
+#define LOG(str, now, res) (void) 0
 #endif
 
 int
index 784ec85038dcc8edb0b9b707dab62512b06f6c9b..2bf143c22513d9ba097205ffe1cf47d6a38f9fad 100644 (file)
@@ -47,9 +47,10 @@ finish_interval (void)
   if (current_width != 0)
     {
       if (current_start == current_end)
-       printf ("%04X\t\t%c\n", current_start, current_width);
+       printf ("%04X\t\t%c\n", (unsigned) current_start, current_width);
       else
-       printf ("%04X..%04X\t%c\n", current_start, current_end, current_width);
+       printf ("%04X..%04X\t%c\n", (unsigned) current_start,
+               (unsigned) current_end, current_width);
       current_width = 0;
     }
 }