[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
silence test-getdate, test-uc_width2 warnings
From: |
Eric Blake |
Subject: |
silence test-getdate, test-uc_width2 warnings |
Date: |
Fri, 05 Dec 2008 07:14:08 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gcc was warning about a statement with no effect, and about a mismatch in
printf parameters.
test-getdate.c: In function `main':
test-getdate.c:61: warning: statement with no effect
uniwidth/test-uc_width2.c: In function `finish_interval':
uniwidth/test-uc_width2.c:50: warning: unsigned int format, ucs4_t arg (arg 2)
I'm committing this:
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkk5NzAACgkQ84KuGfSFAYAPewCgyuI7gM7IyXRF27Sr8IAzJRmo
IfoAoLaTTg5+XJLySC3s8AiZMbKYqAMg
=LkBK
-----END PGP SIGNATURE-----
>From 89dccca22ab944e13326c1364658a041fd1a7836 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Fri, 5 Dec 2008 07:05:31 -0700
Subject: [PATCH] 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 <address@hidden>
---
ChangeLog | 7 +++++++
tests/test-getdate.c | 2 +-
tests/uniwidth/test-uc_width2.c | 5 +++--
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 93dcebf..7b2fe13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-12-05 Eric Blake <address@hidden>
+
+ 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 <address@hidden>
Bruno Haible <address@hidden>
diff --git a/tests/test-getdate.c b/tests/test-getdate.c
index 3433c09..a597722 100644
--- a/tests/test-getdate.c
+++ b/tests/test-getdate.c
@@ -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
diff --git a/tests/uniwidth/test-uc_width2.c b/tests/uniwidth/test-uc_width2.c
index 784ec85..2bf143c 100644
--- a/tests/uniwidth/test-uc_width2.c
+++ b/tests/uniwidth/test-uc_width2.c
@@ -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;
}
}
--
1.6.0.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- silence test-getdate, test-uc_width2 warnings,
Eric Blake <=