about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-08-23 08:22:52 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-23 08:23:02 -0700
commit376b40a27a6783ea7f73ae577be320df66aeb36d (patch)
tree2d328eb18f248077aa5e8260e208c09a48054d16 /sysdeps
parent2b0b9a1c85ea93a64e55bb369e79758195512fc2 (diff)
downloadglibc-376b40a27a6783ea7f73ae577be320df66aeb36d.tar.gz
glibc-376b40a27a6783ea7f73ae577be320df66aeb36d.tar.xz
glibc-376b40a27a6783ea7f73ae577be320df66aeb36d.zip
string/stratcliff.c: Replace int with size_t [BZ #21982]
Fix GCC 7 errors when string/stratcliff.c is compiled with -O3:

stratcliff.c: In function ‘do_test’:
cc1: error: assuming signed overflow does not occur when assuming that (X - c) <= X is always true [-Werror=strict-overflow]

	[BZ #21982]
	* string/stratcliff.c (do_test): Declare size, nchars, inner,
	middle and outer with size_t instead of int.  Repleace %d and
	%Zd with %zu in printf.  Update "MAX (0, nchars - 128)" and
	"MAX (outer, nchars - 64)" to support unsigned outer and
	nchars.  Also exit loop when outer == 0.
Diffstat (limited to 'sysdeps')
0 files changed, 0 insertions, 0 deletions