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 1E1CBA0543; Mon, 13 Jun 2022 11:55:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FC8740150; Mon, 13 Jun 2022 11:55:41 +0200 (CEST) Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by mails.dpdk.org (Postfix) with ESMTP id 36A85400EF; Mon, 13 Jun 2022 11:55:39 +0200 (CEST) Received: from localhost (vishalgaurav.asicdesigners.com [10.193.177.157] (may be forged)) by stargate.chelsio.com (8.14.7/8.14.7) with ESMTP id 25D9taEC018762; Mon, 13 Jun 2022 02:55:37 -0700 Date: Mon, 13 Jun 2022 15:25:36 +0530 From: Rahul Lakkireddy To: Stephen Hemminger Cc: dev@dpdk.org, daxuex.gao@intel.com, wisamm@nvidia.com, stable@dpdk.org Subject: Re: [PATCH] app/flow-perf: fix logic to add comma every three digits Message-ID: References: <08953a79d2cf9a91cc687a25b964c52cf6bb3e09.1654898425.git.rahul.lakkireddy@chelsio.com> <20220610164445.13c66bfb@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220610164445.13c66bfb@hermes.local> 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 On Friday, June 06/10/22, 2022 at 16:45:22 -0700, Stephen Hemminger wrote: > On Sat, 11 Jun 2022 03:36:43 +0530 > Rahul Lakkireddy wrote: > > > Add comma after 1 in 1000 too, like 1,000. Also, since max uint64_t is > > a 20 digit number, increase space in temporary array to hold 20 digits. > > Fixes following warnings when using optimization=1 build flag with > > GCC 11. > > > > ../app/test-flow-perf/main.c: In function ‘pretty_number’: > > ../app/test-flow-perf/main.c:1737:28: warning: ‘sprintf’ may write a terminating nul past the end of the destination [-Wformat-overflow=] > > sprintf(p[i++], "%d", (int)n); > > ^ > > ../app/test-flow-perf/main.c:1737:9: note: ‘sprintf’ output between 2 and 5 bytes into a destination of size 4 > > sprintf(p[i++], "%d", (int)n); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > Bugzilla ID: 1029 > > Fixes: 15c431864000 ("app/flow-perf: add packet forwarding support") > > Cc: stable@dpdk.org > > > > Reported-by: Daxue Gao > > Signed-off-by: Rahul Lakkireddy > > There was a better alternative proposed here: > > https://patchwork.dpdk.org/project/dpdk/patch/20220518101657.1230416-12-david.marchand@redhat.com/ Thanks Stephen. I missed this earlier patch from David. My patch can be dropped. Thanks, Rahul