Jorg, I want to clear up a few things in this bug report: 1. It's completely pointless Debian enabling -Wextra in the packaging when the number of false positives is so incredibly large.
2. Discriminating between false positives and real bugs needs someone to go through the entire codebase, normally upstream. 3. upstream always build with -Werror and -Wall. Adding -Wextra will halt the build until every false positive is "handled" with large numbers of spurious compiler flags and workarounds that add nothing to the codebase or functionality. All these false cases have to be hidden before the true number of real bugs even becomes clear. Breaking the build in that way will simply not be tolerated upstream. 4. Before -Wextra is used, -Wunused MUST be disabled, simply because Gtk prototypes commonly involve passing unused arguments in order to reduce the total number of prototype declarations required. Result? -Wextra is simply not useful to gnucash, upstream, and is also unhelpful to Debian. Until someone convinces upstream that it is worth using -Wextra, nothing is going to change. I am not going to be the one to get shot down for suggesting it. :-) If you are willing to undertake this task and you are willing to spend the time creating patches for the real bugs WITHOUT enabling -Wextra for everyone else upstream, then those patches would be welcome upstream. >> >> -Wextra DOES generate errors under -Werror >> > >> > Who enabled -Werror? >> >> Upstream - sometime during the gnome2 transition. > > No. That's not true. Look at > http://buildd.debian.org/fetch.php?&pkg=gnucash&ver=2.0.1-1&arch=powerpc&stamp=1155098349&file=log&as=raw That's the Debian build - the problems you report can only realistically be addressed upstream and upstream will not accept building without -Werror. You can try and build SVN without -Werror but upstream will usually reject patches that are created from a build made without -Werror. > >> One final comment: Check out the use of a more specific combination of >> -W options that highlight the real issues as compared to the pointless >> warnings. In particular, look at -Wsign-compare with -Wconversion >> *without* using -Wunused. > > I did not enable -Wunused. That's a default option. Same source as above. It still needs to be removed. -Wsign-compare is STILL a better solution than -Wextra too. > One final comment: > ,----[ Debian policy 10.1 ]--- > By default, when a package is being built, any binaries created should > include debugging information, as well as being compiled with > optimization. You should also turn on as many reasonable compilation > warnings as possible; this makes life easier for porters, who can then > look at build logs for possible problems. For the C programming You omitted the rest of that line: For the C programming language, this means the following compilation parameters should be used: CC = gcc CFLAGS = -O2 -g -Wall # sane warning options vary between programs LDFLAGS = # none INSTALL = install -s # (or use strip on the files in debian/tmp) The point is that -Wextra is not specified there, even as an example, and that policy clearly notes that SANE warning options vary between programs. GnuCash does build with -Wall. My point is that -Wextra is NOT a sane option for gnucash - it probably isn't a sane option for many Gtk applications. The only solution is for you to either convince upstream to use it or supply patches to upstream that fix all the real bugs without adding bloat to handle false positives. > BTW: You build without optimization. And you do not support > DEB_BUILD_OPTIONS. Should I send a new bugreport? Yes. FYI I have used -Wextra with -Werror and -Wall on a different project and I found that it highlighted no real bugs and a dozen or more false positives. I have since removed -Wextra from the upstream build for that project. Instead, I use -Wunused (it's not a Gtk project) and a few other specific warnings which -Werror promotes to errors, should they occur. IMHO, -Wextra is just that - extra. It is sometimes useful during upstream development but not an option I would remotely consider introducing into any upstream build. Using -Wextra locally is fine if it helps identify a few real bugs but it is just too unreliable to be made a permanent component of an upstream (or Debian) build configuration. I strongly recommend that any real bugs in gnucash are identified using other, more specific, warnings like -Wsign-compare. I propose that this bug report should be marked "won't fix". If you identify real bugs with other options (like -Wsign-compare), please submit new bug reports with patches. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
signature.asc
Description: OpenPGP digital signature

