John Smith
2008-Jun-26 19:22 UTC
Compile warning using additonal CFLAGS '-Wshadow -Wpointer-arith -Wcast-qual -W'
Hi, Ive just downloaded and build the portable openssh-5.0p1 source on my Linux box, and when I add the CFLAGS '-Wshadow -Wpointer-arith -Wcast-qual -W' I get a lot of warnings of the following type: - -Wuninitialized is not supported without -O - cast discards qualifiers from pointer target type - warning: `foo' is not at beginning of declaration - cast discards qualifiers from pointer target type - unused parameter 'foo' - declaration of 'foo' shadows a global declaration - empty body in an if-statement Maybe one of the developers may need to look into these ? ] Regards, John Smith PS: I can include the full compile log, but Im not sure that this mailing list allows attaxchments.
Darren Tucker
2008-Jun-26 19:52 UTC
Compile warning using additonal CFLAGS '-Wshadow -Wpointer-arith -Wcast-qual -W'
On Thu, Jun 26, 2008 at 09:22:08PM +0200, John Smith wrote:> Ive just downloaded and build the portable openssh-5.0p1 source on my > Linux box, and when I add the CFLAGS '-Wshadow -Wpointer-arith > -Wcast-qual -W' I get a lot of warnings of the following type: > > - -Wuninitialized is not supported without -OThat one is because -Wuninitialized doesn't work unless you also use -O. Add -O to your CFLAGS.> - cast discards qualifiers from pointer target type > - warning: `foo' is not at beginning of declaration > - cast discards qualifiers from pointer target type > - unused parameter 'foo' > - declaration of 'foo' shadows a global declaration > - empty body in an if-statement > > Maybe one of the developers may need to look into these ?Maybe, maybe not, depending on exactly what they are. In many cases, it's difficult to get a warning-free compile in all configurations without increasing the maintenance burden for no real benefit. If you're serious about this, pick one class of warnings, include the source files and line numbers and we can examine them. -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.