On 16-12-16 23:16, Julien Muchembled wrote:
> Le 12/16/16 à 21:52, Steffan Karger a écrit :
>>> +AX_CHECK_COMPILE_FLAG([ -Werror=implicit ], [
>>> +    CFLAGS_EXTRA="$CFLAGS_EXTRA -Werror=implicit"
>>> +])
>>> +AX_CHECK_COMPILE_FLAG([ -Werror=format -Werror=format-security ], [
>>> +    CFLAGS_EXTRA="$CFLAGS_EXTRA -Werror=format -Werror=format-security"
>>> +])
>>> +
>>
>> Shouldn't there be a CFLAGS="${CFLAGS} ${CFLAGS_EXTRA}" somewhere?  Or
>> just use CFLAGS directly, instead of _EXTRA.  Without that, I don't see
>> the flags appear in the make output.
> 
> (how did I miss that?) anyway, there's also
>   https://fossies.org/linux/alsa-lib/m4/attributes.m4
> 
> bigger, GPL2+, and it defines macros that simply append to CFLAGS (e.g. 
> CC_CHECK_CFLAG_APPEND)
> 
> 
> BTW, instead of failing on these 3 specific warnings, we could go the 
> opposite way, since -Wall is quite silent. I suggest:
> 
>   -Wall -Wno-unused -Wno-pointer-sign -Werror -Wno-error=strict-aliasing 
> -Werror=format-security

I like this, we could then get rid of the --enable-strict configure
option.  But I would want to test this in the master branch first to see
what else we need.  I for example also need:

-Wno-error=missing-braces, because clang still wrongfully warns about
using = { 0 } to zero-initialize structs (fixed just recently in gcc)

-Wno-error=duplicate-decl-specifier, to be able to compile against
pkcs11-helper

I reckon there will be more stuff that fails.

Also, is -Werror=format-security needed (instead of -Wformat-security)
if we already have -Werror?

-Steffan

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to