GNU bug report logs -
#23771
Eliminating compiler warnings
Previous Next
Reported by: Ken Brown <kbrown <at> cornell.edu>
Date: Wed, 15 Jun 2016 02:05:01 UTC
Severity: wishlist
Tags: patch
Done: Ken Brown <kbrown <at> cornell.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
I would like to get rid of all compiler warnings in the Cygwin builds
(X11, w32, and nox). There are currently none in the X11 build, but
there are a lot in the other builds. Many of the warnings in the w32
build probably occur in the MinGW build also. And all of the warnings
in the nox build would occur in any build without a window system.
The seven patches attached attempt to eliminate all the currently
existing warnings. There is one patch for each type of warning. Since
they affect other platforms besides Cygwin, I won't install them until
someone has had a chance to review them. There's obviously no rush
about this.
Two comments: First, patch 0006-... is there because there might be a
jump over an AUTO_STRING call. (This happens exactly once in the
Cygwin-w32 build.) It seems stupid to have to worry about this. An
alternative would be to just disable the -Wjump-misses-init warning.
Second, patch 0007-... is there because I couldn't think of a reasonable
way to avoid -Waddress warnings when compiling w32fns.c, w32menu.c, and
menu.c in the Cygwin-w32 build. Everything I thought of would have made
the code very ugly. So I simply disabled that warning for the
Cygwin-w32 build, and I took the liberty of doing the same thing for the
MinGW build, which I think is also affected in some cases. If someone
sees a better way of eliminating those warnings, that would be preferable.
Ken
[0001-Eliminate-noreturn-warnings-if-there-s-no-window-sys.patch (text/plain, attachment)]
[0002-Fix-unused-variable-compiler-warnings.patch (text/plain, attachment)]
[0003-Avoid-empty-body-compiler-warnings.patch (text/plain, attachment)]
[0004-Fix-format-compiler-warnings.patch (text/plain, attachment)]
[0005-Don-t-define-unneeded-function-on-Cygwin.patch (text/plain, attachment)]
[0006-Avoid-jump-misses-init-compiler-warnings.patch (text/plain, attachment)]
[0007-Avoid-address-compiler-warnings.patch (text/plain, attachment)]
This bug report was last modified 8 years and 336 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.