change --picky-developer into --non-picky-developer
Stefan (metze) Metzmacher
metze at samba.org
Fri Mar 14 04:44:35 MDT 2014
>> If a developer has a compiler that generates more warnings
>> (as the gcc from ubuntu 10.04 or 12.04) he needs
>> --non-picky-developer in order to avoid -Werror.
> To get this to pass on the gcc shipped with Ubuntu 14.04, I need the
> attached patch. I guess I could also fix the error for me by installing
> libcups-dev, but (a) I'm mostly building Samba in AD DC mode to play
> with DNS, and (b) I guess there's other reasons we have this code path.
> I think the patch also nicely illustrates why I don't completely like
> "treat warnings as errors". In order to avoid breaking the build with
> this trivial warning, I need to add a lot of visual clutter to make the
> compiler happy.
The problem is the amount of these "trivial" warnings, they make warnings
completely useless as nobody will notice any warnings.
If other people disagree, we can skip the top commit
and use explicit --picky-developer in autobuild.
But I think --non-picky-developer is the better way...
> I do have a similar issue with the enum casts metze introduced to the
> DNS server in this patchset. They case from a dns.idl enum to the
> corresponding dnsp.idl enum and back. Both enums have the identical
> numerical values, so the assignment should be safe in any case. With the
> cast, the code is harder to read.
If this is completely identical we can merge them and just have one
> I can see how in general we want to avoid triggering compiler warnings,
> but do we want to enforce this at the cost of code readability?
I think we try to avoid them if we can and things like explicit casts
make it easier to understand for people who will get the warnings
and wonder if there's a potential bug.
I integrated your patch into my branch.
I've also tested with --bundled-libraries=ALL and allow warning for
popt and zlib. While beeing there I added support for
--bundled-libraries=ALL,!popt and --bundled-libraries=NONE,popt
More information about the samba-technical