X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs Date: Mon, 11 Jun 2001 14:48:50 +0200 (MET DST) From: Hans-Bernhard Broeker X-Sender: broeker AT acp3bf To: djgpp-workers AT delorie DOT com Subject: Re: Compiler options for djdev build In-Reply-To: <200106092104.XAA08855@mother.ludd.luth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sat, 9 Jun 2001, Martin Str|mberg wrote: > Finally the ones I'm not sure what to do about: > > libm. Somebody who understands the code should look at that. > > libc: > make -C ansi/stdio > gcc ... -c flsbuf.c > cc1.exe: warnings being treated as errors > flsbuf.c: In function `_flsbuf': > flsbuf.c:62: warning: comparison between signed and unsigned Same modification as in fflush should do, I think: make 'rn' size_t. Or at least cast it on passing (it's used as a signed number, elsewhere in flsbuf.c > make -C ansi/stdio > gcc ... -c fwrite.c > cc1.exe: warnings being treated as errors > fwrite.c: In function `fwrite': > fwrite.c:32: warning: comparison between signed and unsigned [...] FILE* element _cnt is signed, and that's causing all these. I don't think it can be turned into an unsigned value: it's being operated on like a signed value, all over the place. It receives the return value of read(), is added and subtracted to, and there are lots of places where it's checked for being >= 0 or <0. So these will have to be casted to unsigned, I think. Or someone has to spend quite some time to rewrite sizeable parts of fwrite() and test them thorougly... > make -C ansi/time > gcc ... -c ctime.c > cc1.exe: warnings being treated as errors > ctime.c: In function `tzload': > ctime.c:340: warning: comparison between signed and unsigned > ctime.c:345: warning: comparison between signed and unsigned > ctime.c:351: warning: comparison between signed and unsigned > ctime.c:366: warning: comparison between signed and unsigned > ctime.c:369: warning: comparison between signed and unsigned > ctime.c:379: warning: comparison between signed and unsigned All related to fiels timecnt and typecnt of "struct state". If you turn those into unsigned, you'll receive an avalanche of new warnings because other 'i' loop indices in ctime.c are still signed. Nothing is ever simple. > ctime.c: In function `tzparse': > ctime.c:894: warning: comparison between signed and unsigned > make.exe[3]: *** [ctime.o] Error 1 Same type of difference, this time for field charcnt. > make -C crt0 > gcc ... -c mcount.c > cc1.exe: warnings being treated as errors > mcount.c: In function `mcount': > mcount.c:80: warning: comparison between signed and unsigned > mcount.c:80: warning: comparison between signed and unsigned > mcount.c:82: warning: comparison between signed and unsigned > mcount.c:82: warning: comparison between signed and unsigned > mcount.c:102: warning: comparison between signed and unsigned > mcount.c:103: warning: comparison between signed and unsigned > make.exe[3]: *** [mcount.o] Error 1 'from' and 'to' should be made unsigned. They're addresses, to that makes sense. AFAICS, this should cause no adverse consequences. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.