From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [dpdk-stable] [PATCH v3] kni: fix build with gcc 8.1 Date: Wed, 27 Jun 2018 15:15:11 +0200 Message-ID: <1562187.JQU0VIWQ63@xps> References: <07e4d536-edd6-292d-5adb-c05793731623@intel.com> <20180626113807.67100-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: stable@dpdk.org, "De Lara Guarch, Pablo" , "dev@dpdk.org" , "stephen@networkplumber.org" To: "Yigit, Ferruh" Return-path: In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 26/06/2018 15:43, De Lara Guarch, Pablo: >=20 > > Error observed when CONFIG_RTE_KNI_KMOD_ETHTOOL config option is > > enabled. > >=20 > > build error: > > In function =E2=80=98strncpy=E2=80=99, > > inlined from =E2=80=98igb_get_drvinfo=E2=80=99 at > > .../dpdk/build/build/kernel/linux/kni/igb_ethtool.c:814:2: > > .../include/linux/string.h:246:9: error: =E2=80=98__builtin_strncpy= =E2=80=99 output > > may be truncated copying 31 bytes from a string of length 42 > > [-Werror=3Dstringop-truncation] > > return __builtin_strncpy(p, q, size); > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >=20 > > Fixed by using strlcpy instead of strncpy. > >=20 > > adapter->fw_version size kept same because of > > c3698192940c ("kni: fix build with gcc 7.1") > >=20 > > Also next line strncpy usage replaced with strlcpy while arround. > >=20 > > Fixes: c3698192940c ("kni: fix build with gcc 7.1") > > Cc: stable@dpdk.org > >=20 > > Signed-off-by: Ferruh Yigit >=20 > Acked-by: Pablo de Lara Applied, thanks