[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch to fix build warning for gettext-0.14.4
From: |
Jeff Rizzo |
Subject: |
patch to fix build warning for gettext-0.14.4 |
Date: |
Sun, 1 May 2005 09:28:29 -0700 |
User-agent: |
Mutt/1.4.2.1i |
When building gettext-0.14.4 for NetBSD/macppc, the following warning
happens:
/home/riz/tools-current/bin/powerpc--netbsd-gcc -O2 -pipe -Werror -pipe
-DHAVE_CONFIG_H -I/usr/src-current/gnu/usr.bin/gettext/libnlspr
-I/usr/src-current/gnu/usr.bin/gettext/libnlspr/../include
-I/usr/src-current/gnu/dist/gettext/gettext-tools/lib
-DLOCALEDIR=\"/usr/share/locale\"
-I/usr/src-current/gnu/dist/gettext/gettext-runtime/intl
-DLIBDIR=\"/home/riz/buildobj-current/usr/src-current/destdir.macppc/usr/share\"
-DGETTEXTJAR=\"/home/riz/buildobj-current/usr/src-current/destdir.macppc/usr/share/gettext/gettext.jar\"
-DGETTEXTDATADIR=\"/home/riz/buildobj-current/usr/src-current/destdir.macppc/usr/share/gettext\"
-DHAVE_CONFIG_H -I/usr/src-current/gnu/usr.bin/gettext/libnlspr
-I/usr/src-current/gnu/usr.bin/gettext/libnlspr/../include
-I/usr/src-current/gnu/dist/gettext/gettext-tools/lib
-DLOCALEDIR=\"/usr/share/locale\" -nostdinc -isystem
/home/riz/buildobj-current/usr/src-current/destdir.macppc/usr/include -c
/usr/src-current/gnu/dist/gettext/gettext-tools/src/po-lex.c -o po-lex.o.tmp
/usr/src-current/gnu/dist/gettext/gettext-tools/src/po-lex.c: In function
`mb_width':
/usr/src-current/gnu/dist/gettext/gettext-tools/src/po-lex.c:313: warning:
comparison is always true due to limited range of data type
The following patch silences this warning (in the same way a similar
warning elsewhere in the file is silenced):
--- gettext-tools/src/po-lex.c.orig 2004-09-07 04:27:07.000000000 -0700
+++ gettext-tools/src/po-lex.c 2005-05-01 09:22:51.000000000 -0700
@@ -310,7 +310,11 @@
{
if (mbc->bytes == 1)
{
- if (mbc->buf[0] >= 0x00 && mbc->buf[0] <= 0x1F)
+ if (
+#if CHAR_MIN < 0x00 /* to avoid gcc warning */
+ mbc->buf[0] >= 0x00 &&
+#endif
+ mbc->buf[0] <= 0x1F)
{
if (mbc->buf[0] == 0x09)
return 8 - (gram_pos_column & 7);
pgpQRmfO0pyss.pgp
Description: PGP signature
- patch to fix build warning for gettext-0.14.4,
Jeff Rizzo <=