Compiler warnings in gcc 4.3.2
I recently upgraded to intrepid, which has gcc 4.3.2. It gave a few new warnings, and I've got patches ready for all but this one. I started to write a patch to remove the check, since it's useless, but wasn't sure if it should instead be converted to a signed integer instead. austin(a)austin-desktop:~/wine-git/dlls/dnsapi$ make ccache gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strength-reduce -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wtype-limits -Wpointer-arith -Werror -g -o ns_parse.o ns_parse.c cc1: warnings being treated as errors ns_parse.c: In function 'dns_ns_parserr': ns_parse.c:139: error: comparison of unsigned expression < 0 is always false make: *** [ns_parse.o] Error 1 Relevant code: int dns_ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) { int b; /* Make section right. */ if (section < 0 || section >= ns_s_max) RETERR(ENODEV); -- -Austin
On Tue, Nov 11, 2008 at 9:17 PM, Austin English <austinenglish(a)gmail.com> wrote:
I recently upgraded to intrepid, which has gcc 4.3.2. It gave a few new warnings, and I've got patches ready for all but this one. I started to write a patch to remove the check, since it's useless, but wasn't sure if it should instead be converted to a signed integer instead.
Change what to signed? We don't control the type of ns_sect. -- James Hawkins
On Tue, Nov 11, 2008 at 9:28 PM, James Hawkins <truiken(a)gmail.com> wrote:
On Tue, Nov 11, 2008 at 9:17 PM, Austin English <austinenglish(a)gmail.com> wrote:
I recently upgraded to intrepid, which has gcc 4.3.2. It gave a few new warnings, and I've got patches ready for all but this one. I started to write a patch to remove the check, since it's useless, but wasn't sure if it should instead be converted to a signed integer instead.
Change what to signed? We don't control the type of ns_sect.
-- James Hawkins
Sorry, that was worded poorly. We could change section to a signed int, but that just screams hackish. Removing the check didn't seem appropriate either, but since it's useless, may be the appropriate method. -- -Austin
participants (2)
-
Austin English -
James Hawkins