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 93dcebf..7b2fe13 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 3433c09..a597722 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 784ec85..2bf143c 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;
     }
 }