From: Bruno Haible Date: Mon, 18 Jul 2005 11:39:57 +0000 (+0000) Subject: Avoid a gcc warning on Linux/PowerPC. X-Git-Tag: v0.15~483 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f8891c82889ec5a94e7f2a71cd2c1bb1cf1a96a;p=thirdparty%2Fgettext.git Avoid a gcc warning on Linux/PowerPC. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 6627c3b2e..f9ea1165c 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,9 @@ +2005-07-17 Bruno Haible + + * po-lex.c (mb_width): Remove gcc warnings on platform with unsigned + 'char' type (e.g. Linux/PowerPC). + Reported by Jeff Rizzo . + 2005-07-05 Bruno Haible * Makefile.am (msgmerge_SOURCES, xgettext_SOURCES, msgattrib_SOURCES, diff --git a/gettext-tools/src/po-lex.c b/gettext-tools/src/po-lex.c index a9ec3c083..6a4fee8b8 100644 --- a/gettext-tools/src/po-lex.c +++ b/gettext-tools/src/po-lex.c @@ -310,7 +310,11 @@ mb_width (const mbchar_t mbc) { 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);