]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix string/tester.c for GCC 7 -Wstringop-overflow=.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 4 Jan 2017 23:33:31 +0000 (23:33 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 4 Jan 2017 23:33:31 +0000 (23:33 +0000)
commit3ecd616cc1782210d09c9678ec1a48899f19145b
tree878f886eb356d5220912463060e6c55dfe384dd3
parent3d7229c2507be1daf0c3e15e1f134076fa8b9025
Fix string/tester.c for GCC 7 -Wstringop-overflow=.

GCC 7 has a -Wstringop-overflow= warning that includes warning for
strncat with a size specified that is larger than the size of the
buffer (which is dubious usage, but valid at runtime if in fact there
isn't an overflow with the particular buffer contents present).
string/tester.c tests such cases; this patch arranges for this warning
to be ignored around relevant strncat calls.

Tested compilation for aarch64 (GCC mainline) with
build-many-glibcs.py; did execution testing for x86_64 (GCC 5).

* string/tester.c (test_strncat): Disable -Wstringop-overflow=
around tests of strncat with large sizes.
ChangeLog
string/tester.c