From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C15C8A0AC5 for ; Thu, 2 May 2019 14:24:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9A52A5681; Thu, 2 May 2019 14:24:17 +0200 (CEST) Received: from mail-ua1-f66.google.com (mail-ua1-f66.google.com [209.85.222.66]) by dpdk.org (Postfix) with ESMTP id 3AB365589 for ; Thu, 2 May 2019 14:24:16 +0200 (CEST) Received: by mail-ua1-f66.google.com with SMTP id z17so643233uar.3 for ; Thu, 02 May 2019 05:24:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=12pHAgRUAuX+5tAXM5FX0JOJ0M427nWajxfq0oPQ6/E=; b=nqBYdiIVnzx5GUPkMhgUVMwWjBcq6sHaQRrycbVL7nAIANc1GwIZ1yOPJ8EJaWEmFV 9ndBK+xbohdQNB7k14wAq83aF58Egei+VExBCqOuClpNjafzZuVPQdcee4sDxD5ukFhu ZSiWUAzPU5f61xNi8Ni3DpVc69QRyqGIdDn63bqDwNDiTS5GEcwOPiFR2otyQ+mzCj+G 6AVeYGMf8D14srghuCc6zox30KqXdaeJSnM49NE2ASNuyIOgC2RALYhNUWxbdybS+L8/ PF5Clg1TK6NXvi3T+G60Ibsd3f6msHkohe7BYObkbAuuussP31kUgPktsKSya+cdhsNx Et2w== X-Gm-Message-State: APjAAAUjgcH1Cx+Rw5HSYAQ3xoc0tTdu9LJ44U2fW6ODJoZ/l7ByPh+H vKBYfFWYCsjIu9YthK4sViB75+nDVVMatJF8aPzKaw== X-Google-Smtp-Source: APXvYqxaXu1tA9ZGyHXdzNKa9pQKcl+GbesdhAeZpqth8so+g+35qGF4dMt/BdKX2y0Igxr1dROneMy/w//86dbVE4g= X-Received: by 2002:ab0:6419:: with SMTP id x25mr1566382uao.86.1556799855632; Thu, 02 May 2019 05:24:15 -0700 (PDT) MIME-Version: 1.0 References: <20190501195014.2938-1-bruce.richardson@intel.com> <20190501195014.2938-5-bruce.richardson@intel.com> In-Reply-To: <20190501195014.2938-5-bruce.richardson@intel.com> From: David Marchand Date: Thu, 2 May 2019 14:24:04 +0200 Message-ID: To: Bruce Richardson Cc: dev , nipun.gupta@nxp.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 4/4] raw/dpaa2_cmdif: fix warnings with GCC 9 on Fedora 30 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190502122404.osrECyjKOIt5ygRrbD8-e2mGxxZ-AY9irIC4-qYjPzk@z> On Wed, May 1, 2019 at 9:51 PM Bruce Richardson wrote: > GCC9 gives warnings if the parameter passed to printf for "%s" could be > NULL, so we need to add checks in some cases to ensure that is not the > case. > > Fixes: 3298fa4853b8 ("raw/dpaa2_cmdif: introduce DPAA2 command interface > driver") > Cc: nipun.gupta@nxp.com > > Signed-off-by: Bruce Richardson > --- > drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c > b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c > index 7d311b2ee..da3c7d7a6 100644 > --- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c > +++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c > @@ -270,6 +270,8 @@ dpaa2_cmdif_remove(struct rte_vdev_device *vdev) > int ret; > > name = rte_vdev_device_name(vdev); > + if (name == NULL) > + return -1; > > DPAA2_CMDIF_INFO("Closing %s on NUMA node %d", name, > rte_socket_id()); > > -- > 2.21.0 > > Tested-by: David Marchand -- David Marchand