From 376b40a27a6783ea7f73ae577be320df66aeb36d Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 23 Aug 2017 08:22:52 -0700 Subject: string/stratcliff.c: Replace int with size_t [BZ #21982] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 59715f3161..e9d5383b1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2017-08-23 H.J. Lu + + [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. + 2017-08-23 Adhemerval Zanella * include/fcntl.h (__fcntl_nocancel): Remove definition. -- cgit v1.2.3