From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6C30CA0A0A; Wed, 5 May 2021 18:00:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 499DC41145; Wed, 5 May 2021 18:00:45 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5605340143; Wed, 5 May 2021 18:00:43 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id AF5C920B7178; Wed, 5 May 2021 09:00:42 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AF5C920B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1620230442; bh=dRR5jDpSAnK5sjvL8LAmkKH6zIbHiiwTWIPyq1w0NNA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gioDz5S9knTtowdFZDp2hT+SG7tIeVlEI9bT0u21W3OIr0ttNWEuN9KMg98lBhVw7 oMJ5+/O1TmtCgAtMrFNNhwH32hCqisOm9S37/FI9FytT46VHRccJm5sqlxuWOS7zVr sM5zdXRjhOFiLsMAPZW1v4rUzDPXr+hy0+K6wm9Q= Date: Wed, 5 May 2021 09:00:42 -0700 From: Tyler Retzlaff To: Dmitry Kozlyuk Cc: dev@dpdk.org, stable@dpdk.org, Bruce Richardson , John McNamara Message-ID: <20210505160042.GB13051@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20210502025656.29910-1-dmitry.kozliuk@gmail.com> <20210504001147.GB21458@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20210504094822.7072ef01@sovereign> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210504094822.7072ef01@sovereign> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [PATCH] examples/rxtx_callbacks: fix port ID format specifier X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, May 04, 2021 at 09:48:22AM +0300, Dmitry Kozlyuk wrote: > 2021-05-03 17:11 (UTC-0700), Tyler Retzlaff: > > On Sun, May 02, 2021 at 05:56:56AM +0300, Dmitry Kozlyuk wrote: > > > Use "%u" and a cast as in other places when port ID is formatted. > > > This fixes -Wformat warning with clang 10.0.0 on Windows. > > > > > > Fixes: f8244c6399d9 ("ethdev: increase port id range") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Dmitry Kozlyuk > > > --- > > > examples/rxtx_callbacks/main.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c > > > index b57b2fc6bc..9574b6ea0d 100644 > > > --- a/examples/rxtx_callbacks/main.c > > > +++ b/examples/rxtx_callbacks/main.c > > > @@ -329,8 +329,8 @@ main(int argc, char *argv[]) > > > /* initialize all ports */ > > > RTE_ETH_FOREACH_DEV(portid) > > > if (port_init(portid, mbuf_pool) != 0) > > > - rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu8"\n", > > > - portid); > > > > how come not just `% " PRIu16 "\n"' ? > > > > what was the -Wformat clang on windows complaint? > > PRIx16 would work, but I noticed that in other places where port ID is > printed, the pattern above is used. IMO uniform approach is better. ah, consistency. yes i'll have some of that. maybe one day in the future we can change them all in one shot, but not today. Acked-By: Tyler Retzlaff