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 CCA8AA0562; Tue, 4 May 2021 08:48:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5229E4014D; Tue, 4 May 2021 08:48:26 +0200 (CEST) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by mails.dpdk.org (Postfix) with ESMTP id 94A3F40147; Tue, 4 May 2021 08:48:24 +0200 (CEST) Received: by mail-lj1-f173.google.com with SMTP id v5so1006803ljg.12; Mon, 03 May 2021 23:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x9ggkqyhztq7DOjaDUtqjcUshvmLrc1IwRqG1QRs/JQ=; b=FGRphHcryxwNqIOybZF+Z3rSxE7oOmUcO5sJqcHKI6JUXm3cW8sHw0/RGQzL6+iQph 2043ADJBF/CWWPORipbcu4G+lIxhGcFo2Lkr6uNYzIdr9/x8/nsukp/pnoR4f02ujkyu i+ZHUEpcc0zpHp141gOV16IUlIAaELA2RsjoDSgOEU0eYql0HywfZsjck2fMsWKL7LhA zS6ZoKOLC8uoarmCdQclMjXX2EQR9KvcEVr4Dlw2UXFB330jDIiNuaCX3UGSH/Pv8F4Q 3lCKXSVeo9ojGeVW6YZrACoO+t9e+2J0en5eqxBDA/fss06g+sbRIJWlo4GgCQp6UFKi tNkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x9ggkqyhztq7DOjaDUtqjcUshvmLrc1IwRqG1QRs/JQ=; b=oW328RquyVLr5lZjZHnSq6JAEuOMaof4l3ZwcNs2p6uAfTjAOdysbzNuFnXEBp8bVU 3NuiGDUOyNh0P/TViEDTvH6CxMKFfmWb6zGywNsW/g4DeFIgCWfWkqxJNCEhlk1n+UWx koYLuRKK9raSbp8xtEa412kKyE5IttG+MhxYIZaGAGiD+b/DQor4ufBbOpq8bYYnZ5rq 0pRDfv8de1gmTrPXHmPNzNbvVxosRRmEj/H6FOwyNwDecAwgjdxCHZiijkaHM7Fc/ptp K6wZMUQ4rTSjoguOkhHerjdGDD2FsWrECX1SzBqpDCWb9WtIx/2jY8zRByowGIpL34R7 pSQw== X-Gm-Message-State: AOAM531slMaeBAyNSJpFMpNIch2NcNtPsfuEU0rNo8qmu53bGcWxcf86 lpLTSAjF5iPXSpeZARo+b6c= X-Google-Smtp-Source: ABdhPJxFLvbqMSog3H2Zb6JHixIfSt7agC3ZQ2AnlB+KEacw2sr17JqkBDuz8gNjC8RBJNygrkbCtw== X-Received: by 2002:a2e:581a:: with SMTP id m26mr7554408ljb.493.1620110904188; Mon, 03 May 2021 23:48:24 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id i10sm468942ljn.51.2021.05.03.23.48.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 23:48:23 -0700 (PDT) Date: Tue, 4 May 2021 09:48:22 +0300 From: Dmitry Kozlyuk To: Tyler Retzlaff Cc: dev@dpdk.org, stable@dpdk.org, Bruce Richardson , John McNamara Message-ID: <20210504094822.7072ef01@sovereign> In-Reply-To: <20210504001147.GB21458@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20210502025656.29910-1-dmitry.kozliuk@gmail.com> <20210504001147.GB21458@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" 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.