quiting X warnings in /bin/sh
"David O'Brien" <[email protected]> Mon, 28 Feb 2005 19:33:53 -0800
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Organization | The NUXI BSD Group |
| Message-ID | <[email protected]> |
On 'i386' one gets several "comparison is always true due to limited
range of data type" warnings when compiling bin/sh because PEOF is -129
and SYNBASE is 129. Which of course are outside the range of an 8-bit
character. I think the correct fix is the patch below to give a range of
-128..128 in the signed character case, and -1..1 in the unsigned
character case.
Index: mksyntax.c
===================================================================
RCS file: /home/ncvs/src/bin/sh/mksyntax.c,v
retrieving revision 1.23
diff -u -r1.23 mksyntax.c
--- mksyntax.c 6 Apr 2004 20:06:51 -0000 1.23
+++ mksyntax.c 1 Mar 2005 03:29:50 -0000
@@ -158,7 +158,7 @@
size = (1 << nbits) + 1;
base = 1;
if (sign)
- base += 1 << (nbits - 1);
+ base += (1 << (nbits - 1)) - 1;
digit_contig = 1;
for (i = 0 ; i < 10 ; i++) {
if (digit[i] != '0' + i)
--
-- David ([email protected])
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-audit
To unsubscribe, send any mail to "[email protected]"