[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