changeset 30539:a44e02f02f98

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. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Fri, 05 Dec 2008 07:05:31 -0700
parents 95bc8d012563
children fe61c14274ae
files ChangeLog tests/test-getdate.c tests/uniwidth/test-uc_width2.c
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Dec 03 17:47:08 2008 -0800
+++ b/ChangeLog	Fri Dec 05 07:05:31 2008 -0700
@@ -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>
 
--- a/tests/test-getdate.c	Wed Dec 03 17:47:08 2008 -0800
+++ b/tests/test-getdate.c	Fri Dec 05 07:05:31 2008 -0700
@@ -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
--- a/tests/uniwidth/test-uc_width2.c	Wed Dec 03 17:47:08 2008 -0800
+++ b/tests/uniwidth/test-uc_width2.c	Fri Dec 05 07:05:31 2008 -0700
@@ -47,9 +47,10 @@
   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;
     }
 }