bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-diffutils] Building diffutils 3.3 with hardening flags


From: Eric Blake
Subject: Re: [bug-diffutils] Building diffutils 3.3 with hardening flags
Date: Mon, 12 Aug 2013 10:19:43 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

[adding bug-gnulib]

On 08/12/2013 09:57 AM, Santiago Vila wrote:
> Hello.
> 
> When building diffutils 3.3 using hardening compiler flags, I get this:
> 
> gcc -std=gnu11  -I. -I../lib -DIN_DIFFUTILS_GNULIB_TESTS=1 -I. -I. -I.. 
> -I./.. -I../lib -I./../lib -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector 
> --param=ssp-buffer-size=4 -Wformat -Werror=format-security -c -o 
> test-xvasprintf.o test-xvasprintf.c
> test-xvasprintf.c: In function 'test_xasprintf':
> test-xvasprintf.c:98:5: error: format not a string literal and no format 
> arguments [-Werror=format-security]
> cc1: some warnings being treated as errors

You'll have this problem on ALL packages that share this test from
gnulib.  I think a better fix would be to use a #pragma GCC to tell the
compiler that we intentionally don't want warnings on this particular
unit test.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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