[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_*/AM_* macros for options

From: Jeffrey Walton
Subject: Re: AC_*/AM_* macros for options
Date: Tue, 29 Oct 2013 19:39:25 -0400

On Tue, Oct 29, 2013 at 7:11 PM, Paul Eggert <address@hidden> wrote:
> Jeffrey Walton wrote:
>>> unfixable warnings for most network code due to macro expansion.  See:
>>> >
>>> >
>>> >
>>> > The pattern explained in that bug is still present in the current glibc
>>> > headers.
>> Well, you can do one of three things. You can allow the defective code
>> to thrive, you can fix the defective code ...
> That particular problem appeares to be fixed in current glibc.
> On Ubuntu 13.10:
> $ cat htnos.cpp
> #include <netinet/in.h>
> #include <arpa/inet.h>
> void test( int port )
> {
>   struct sockaddr_in sa;
>   sa.sin_port = htons( (uint16_t)port ); // << Warning here in optimized mode
> }
> $ g++ -Wconversion -c htnos.cpp
> [no output]
>> bitops.h is banned from my code bases
> bitops.h is not something provided by Autoconf or by
> glibc, so I'm not sure what this (or the rest of your
> email) is about.
That was about omitting warnings because the they create too much
noise. Worse, a lot of that junk is coming from l33t coders who should
know better (how many times has glibc or the Linux kernel made Bugtraq
or Full Disclosure???).

The defective code needs to be fixed or banned. Turning the waring off
because its inconvenient is putting the gun to the head and pulling
the trigger.

Clearly you favor the use of functions
> like strcpy_s, but it's not just Ulrich Drepper who's
> skeptical of that sort of approach; see, for example
> <>.
Yes, I've read them too. The baby was thrown out with the bath water.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]