[PATCH] Fix gcc 9 build errors for make xcheck.

Stefan Liebler stli@linux.ibm.com
Mon Jun 17 06:35:00 GMT 2019


Hi,

this patch fixes the following gcc 9 warnings for "make xcheck":
-string/tst-strcasestr.c:
../include/bits/../../misc/bits/error.h:42:5: error: ‘%s’ directive 
argument is null [-Werror=format-overflow=]

-argp/argp-test.c:
argp-test.c:130:20: error: ‘%d’ directive writing between 1 and 11 bytes 
into a region of size 10 [-Werror=format-overflow=]
argp-test.c:130:19: note: directive argument in the range [-2147483648, 122]
argp-test.c:130:5: note: ‘sprintf’ output between 2 and 12 bytes into a 
destination of size 10

-nss/tst-field.c:
tst-field.c:52:7: error: ‘%s’ directive argument is null 
[-Werror=format-overflow=]

Bye
Stefan

ChangeLog:

	* string/test-strcasestr.c (check_result): Add NULL check.
	* nss/tst-field.c (check_rewrite): Likewise.
	* argp/argp-test.c (popt): Increase size of buf to 12.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20190614_gcc9warnings.patch
Type: text/x-patch
Size: 2400 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20190617/6bcf98af/attachment.bin>


More information about the Libc-alpha mailing list