From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82559 invoked by alias); 21 Aug 2017 13:25:34 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 77914 invoked by uid 89); 21 Aug 2017 13:23:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:533 X-HELO: relay1.mentorg.com Date: Mon, 21 Aug 2017 13:25:00 -0000 From: Joseph Myers To: "H.J. Lu" CC: GNU C Library Subject: Re: [PATCH] string/stratcliff.c: Replace int with size_t [BZ #21982] In-Reply-To: <20170820171713.GA19531@gmail.com> Message-ID: References: <20170820171713.GA19531@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-08/txt/msg00973.txt.bz2 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