From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 1/2] bus/dpaa: fix build with gcc 9.0 Date: Thu, 1 Nov 2018 10:42:31 -0700 Message-ID: <20181101104231.1a4c1d72@xeon-e3> References: <20181101131951.91459-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon , Hemant Agrawal , Shreyansh Jain , dev@dpdk.org, stable@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 3E67D5B32 for ; Thu, 1 Nov 2018 18:42:41 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id u13-v6so4062190pfm.4 for ; Thu, 01 Nov 2018 10:42:41 -0700 (PDT) In-Reply-To: <20181101131951.91459-1-ferruh.yigit@intel.com> 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 Thu, 1 Nov 2018 13:19:50 +0000 Ferruh Yigit wrote: > build error: > In function =E2=80=98fman_if_init=E2=80=99, > .../drivers/bus/dpaa/base/fman/fman.c:186:2: > error: =E2=80=98strncpy=E2=80=99 output may be truncated copying 4095= bytes from a > string of length 4095 [-Werror=3Dstringop-truncation] > strncpy(__if->node_path, dpa_node->full_name, PATH_MAX - 1); >=20 > strncpy may result a not null-terminated string, > replaced it with rte_strscpy >=20 > Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ferruh Yigit Maybe just use strlcpy instead of a DPDK specific function. That way if Gcc gets smarter it can check that as well.