From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 741781C753 for ; Wed, 4 Apr 2018 17:35:44 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EEF3521AAA; Wed, 4 Apr 2018 11:35:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 04 Apr 2018 11:35:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=fXGc/w7DX9hGivhY5S01maTCGO SgLd/DSrnh2Sy5FlI=; b=pUmGzaH+XQ2cdUCcOrtGrXskCtDgSat3nSOqAUxUzf GdOMm/3ksG/jEmHzKvEYY6x0Nd3MvdL4nr8cJqlwfVwK9Es/mSIh+vs2a5tvkd7l fyiK5MKUzD4cUnfj2HIWCVSSolDmKULArJ3dGbZk5zF3gA6X8WnwmKiRksWSbES6 w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=fXGc/w 7DX9hGivhY5S01maTCGOSgLd/DSrnh2Sy5FlI=; b=AMwJpZdTWMdn3gNhys9Bp0 g+r1Sb9svM1D+GP04oIe0AI1913TVEtg98IazhlDeoX09r9LfmDYA9rZE0wnZC0q bnq1ERqq/+N/hk7IrhnZUloEhQlRh5au8OBHj5QGV6rM/05h+HMhBVG/WYGFDLHP ZioRp01vbyqbMZNxonwN37GY5BvhBZ8cWRupl7xr17gDMecJUEgxifu9uZXWfLk6 Eyga6dTLVg5L/GfE0kOOm8gCpsQU4Y0LblN68JBOugrtnIetYAsgfXqJkVCrdy2v YPDYe2JB+HpFBhuKQZ0aByWZCu+HmPwPOZTvLy42bKPKGurIDMXB/Ib4Rkqdrrpg == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 79732E444A; Wed, 4 Apr 2018 11:35:43 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org Date: Wed, 04 Apr 2018 17:35:42 +0200 Message-ID: <1836809.Bf90Dp1qdv@xps> In-Reply-To: <20180329170531.2478-2-stephen@networkplumber.org> References: <20180329170531.2478-1-stephen@networkplumber.org> <20180329170531.2478-2-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v3 1/2] rte_mbuf: fix strncpy warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2018 15:35:44 -0000 29/03/2018 19:05, Stephen Hemminger: > Gcc-8 discovers issue with platform_mempool_ops. > rte_mbuf_pool_ops.c:26:3: error: =E2=80=98strncpy=E2=80=99 output truncat= ed before > terminating nul copying as many bytes from a string as its length > [-Werror=3Dstringop-truncation] > strncpy(mz->addr, ops_name, strlen(ops_name)); >=20 > Since the ops_name is already checked for size, using strncpy > here is unnecessary; just use strcpy. >=20 > Fixes: a3acc3144a76 ("mbuf: add pool ops selection functions") > Signed-off-by: Stephen Hemminger Applied, thanks