Skip to content
Commit 99c7adf9 authored by Joseph Myers's avatar Joseph Myers
Browse files

Fix tst-cmp.c build with GCC mainline.

Building the testsuite with GCC mainline fails with
-Wstringop-overflow= errors in string/tst-cmp.c.  These are for calls
to strncmp and strncasecmp with SIZE_MAX size argument.  The tests are
deliberately using this size that would be dubious in normal code, so
this patch disables the warning for the calls in question.

Tested with build-many-glibcs.py for aarch64-linux-gnu.

	* string/tst-cmp.c: Include <libc-diag.h>.
	(strncmp_max): Disable -Wstringop-overflow= around call to
	strncmp.
	(strncasecmp_max): Disable -Wstringop-overflow= around call to
	strncasecmp.
parent 1760daad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment