From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] net/mrvl: fix build error with gcc Date: Tue, 27 Mar 2018 20:11:05 +0100 Message-ID: References: <20180322181847.74246-1-ferruh.yigit@intel.com> <20180323075229.GA22697@sh> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Jacek Siuda , Dmitri Epshtein , Natalie Samsonov , Jianbo Liu , dev@dpdk.org To: Tomasz Duszynski Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 154F85F38 for ; Tue, 27 Mar 2018 21:11:08 +0200 (CEST) In-Reply-To: <20180323075229.GA22697@sh> Content-Language: en-US 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 3/23/2018 7:52 AM, Tomasz Duszynski wrote: > On Thu, Mar 22, 2018 at 06:18:47PM +0000, Ferruh Yigit wrote: >> gcc version: >> aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011 >> >> build error: >> CC mrvl_qos.o >> .../drivers/net/mrvl/mrvl_qos.c: In function ‘mrvl_configure_rxqs’: >> .../drivers/net/mrvl/mrvl_qos.c:679:17: >> error: ‘sprintf’ may write a terminating nul past the end of the >> destination [-Werror=format-overflow=] >> sprintf(match, "policer-%d:%d\n", priv->pp_id, priv->ppio_id); >> ^~~~~~~~~~~~~~~~~ >> .../drivers/net/mrvl/mrvl_qos.c:679:2: >> note: ‘sprintf’ output between 13 and 17 bytes into a destination >> of size 16 >> sprintf(match, "policer-%d:%d\n", priv->pp_id, priv->ppio_id); >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> Fixed by replacing sprintf to snprintf. >> >> Fixes: 8860fd7b70f0 ("net/mrvl: add ingress policer support") >> Cc: tdu@semihalf.com >> >> Signed-off-by: Ferruh Yigit > Acked-by: Tomasz Duszynski Squashed into relevant commit in next-net, thanks.