This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] string/stratcliff.c: Replace int with size_t [BZ #21982]


On Sun, 20 Aug 2017, H.J. Lu wrote:

> @@ -101,7 +101,7 @@ do_test (void)
>  
>  	      if (STRLEN (&adr[outer]) != (size_t) (inner - outer))
>  		{
> -		  printf ("%s flunked for outer = %d, inner = %d\n",
> +		  printf ("%s flunked for outer = %Zd, inner = %Zd\n",

I don't think we should be using legacy %Z in any new code.  Use C99 %zu 
for size_t (%zd only if the argument is the corresponding signed type 
rather than size_t itself).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]