From: Bruce Richardson Date: Wed, 1 May 2019 19:50:14 +0000 (+0100) Subject: raw/dpaa2_cmdif: fix warnings with GCC 9 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a53f14f96112a0851a9c3788dd1e7b9d61c50191;p=dpdk.git raw/dpaa2_cmdif: fix warnings with GCC 9 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: stable@dpdk.org Signed-off-by: Bruce Richardson --- diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c index 7d311b2eef..da3c7d7a64 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());