Johan: Oops... didn't realise I sent already! I'm not sure how I managed that!
I haven't been following this in great detail, so apologies if this point has been made already!
We've already had a few issues where an upstream library header contains something dodgy (but essentially harmless). A -Werror build, therefore fails, and there's nothing that we can do in-tree to fix it.
This is why I introduced the "strict-build" configure option. Maybe three levels of strictness is appropriate?
1. Ultra strict: -Werror with all possible warnings enabled... this will almost always fail (regardless of our best efforts) for the reasons above but is good for robust compilation testing. 2. Strict: -Wall with explicitly listed -Werror=* for things that we know we can fix in our own source. 3. Permissive: -Wall but no -Werror; (for releases)
Also, I'm a bit nervous about enabling lots of compiler warnings on our embedded copies of upstream libraries. Fixing minor errors in upstream code is a nice thing to do, in principle, but it makes it really painful to get rid of the library if we ever wanted to. My experience with GDL was hindered because all the meaningful changes against upstream were obfuscated by years of minor patching. For that reason, I'd recommend that we come up with a roadmap for what we're going to do with each library before we start aggressively fixing warnings.
AV
On 24 March 2014 23:44, Alex Valavanis <valavanisalex@...400...> wrote:
I haven't been following this in great detail, so apologies if this point has been made already!
On 24 March 2014 23:32, Johan Engelen <jbc.engelen@...2592...> wrote:
On 25-3-2014 0:24, Markus Engel wrote:
Does the compiler warn with
void U_WMRCORE_SIZE16_swap(char *record, int /*torev*/){
as well? I've seen this several times.
It's C code Markus. (I'll stop there...)
Regards, Markus
-----Ursprüngliche Nachricht----- Von: mathog [mailto:mathog@...1176...] Gesendet: Dienstag, 25. März 2014 00:20 An: su_v Cc: Inkscape Devel Betreff: Re: [Inkscape-devel] Warnings check
On 22-Mar-2014 06:16, su_v wrote:
-Wno-error=self-assign
more errors:
../../src/libuemf/uwmf_endian.c:285:10: error: explicitly assigning a variable of type 'int' to itself [-Werror,-Wself-assign]
Sometimes you can't win.
The line with the warning is the second one below:
void U_WMRCORE_SIZE16_swap(char *record, int torev){ torev = torev; // shuts up compiler warnings about unused parameters U_swap4(record, 1); /* Size16_4 is at offset 0 in U_METARECORD */ }
where this is one of those situations where there are a large number of functions all use the same argument list, but some of them don't actually use some of the arguments. The
torev = torev
trick is one way to silence the "unused argument" warning in gcc and last time I checked it worked for several other compilers as well, like Sun's compiler. Apparently not for clang though. Note this is in a C module, so the C++ syntax to indicate an unused argument will not work. AFAIK the C language specification provides no standard way to eliminate this warning or its evil twin "statement with no effect", which is what you get if you try to finesse this situation with:
(void) torev;
Note, the other similar clang warnings are all for the same thing.
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
-- Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel