Re: Bug, well not really but could be?

Mark Johnson <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
On Tue, Dec 1, 2009 at 5:58 PM, Daryl Tester
<[email protected]> wrote:
> Mark Johnson wrote:
>
>> I consider compiler warnings to be broken windows.
>
> To a certain extent, but to be fair you're talking about gcc here - some
> (many?) of its warnings are obtuse and GNU-centric pedantry.  Granted that
> your port isn't aiming for non-gcc environments (AFAIK), but how would you
> successfully suppress all those warnings for multi-vendors' compilers
> (without redirecting stderr to /dev/null)?

I'm not aiming for any environment in particular.  At the moment, I
eat my own dogfood on Linux with GCC.  I did most of the work I've
done on my forks on a MacBook Pro with OS X.  In the early days, I
tried to make sure I could at least get a clean build on *BSD, but I
haven't been keeping up with that.

I'll admit that I don't go out of my way to make things easy for
anybody on a non-Posix *nix, but that's mainly because I don't want to
clutter up the Autoconf configuration with stuff that nobody uses.  If
anybody comes out of the woodwork with an oddball platform, I'd be
happy to drop in some fixes.

I target what I use because nobody has asked for anything else.

As far as GCC, it's doing it's job.  I don't consider any of the
warnings I encountered and fixed to be 'obtuse' or 'GNU-centric
pedantry'.  Some of them were actually the direct result of the GCC
compiler flags Dan used in the last official releases of daemontools
and djbdns (check the stock conf-cc).  I think that some of the issues
I fixed would have caused warnings with any modern compiler, with any
set of flags.  Where there wasn't an easy code tweak, I was faced with
the option of ignoring the warning or disabling it, even though Dan
had explicitly enabled it.  I chose the latter option, however I did
so in the narrowest fashion I could manage, via a GCC pragma in
specific source files.  I'd be willing to try to do the same for other
compilers if anybody makes the request.

If you'd like, you can browse the source code, see my comments and get
diffs here:

http://zinq.svn.sourceforge.net/viewvc/zinq/

I'd be happy to go into specifics if anybody is interested.  Doing
what I've done may seem pointless and silly to some, but I don't want
to miss a new warning I caused by changing something to get lost
amongst the other warnings.  So I eliminated the other warnings.  Now,
if I see any, I know I don't understand what I was hacking on as well
as I thought I did.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.