From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D6CBA00E6 for ; Wed, 7 Aug 2019 05:12:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 532652C16; Wed, 7 Aug 2019 05:12:00 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 6231127D for ; Wed, 7 Aug 2019 05:11:59 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x773AkLY023867; Tue, 6 Aug 2019 20:11:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=evSLtLmn2+DM0d4a86FOr752zwvHPhn5x2J5EaHpRIA=; b=V8R/wTOJNLOhTCAy5zG0ERnREFZZGoeom6WIndHyFAJg3R4932BrR38cHis/DCvxPmdE RWMk+sqQvMHQuB/NosOChwrRoOQxUu9uJEkUt85xFxM55JY3uS55C44bzsdjljs5+6K6 6+SM7DqOdO3FTghY309Yw67yRGLu5yxHj3W9PXpqxssGGB9eO7XpdloXpTWXvNDvR5p2 rhAV3nuir0MgudQES1og/LE90liTntl8ozJL+Ux30QkUYN7Ust432NEggK//aUcrNHAo Hn1BcCodg7fQEOlmqXnp293ZTUJii+eCuAw/XZDZKHY8VfP4GIDRZzdZHKxUv5Tm0F7r yw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2u59skwga5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 06 Aug 2019 20:11:57 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 6 Aug 2019 20:11:55 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 6 Aug 2019 20:11:55 -0700 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 5E0AC3F703F; Tue, 6 Aug 2019 20:11:54 -0700 (PDT) From: To: , Jakub Grajciar CC: , Jerin Jacob Date: Wed, 7 Aug 2019 08:41:34 +0530 Message-ID: <20190807031134.23120-1-jerinj@marvell.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-07_01:2019-08-05,2019-08-07 signatures=0 Subject: [dpdk-dev] [PATCH] net/memif: fix build error with gcc 9.1 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" From: Jerin Jacob gcc-9 stricter on NULL arguments for printf. Fix the following build error by avoiding NULL argument to printf. In file included from drivers/net/memif/memif_socket.c:26: In function 'memif_socket_create', inlined from 'memif_socket_init' at net/memif/memif_socket.c:965:12: net/memif/rte_eth_memif.h:35:2: error: '%s' directive argument is null [-Werror=format-overflow=] 35 | rte_log(RTE_LOG_ ## level, memif_logtype, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 36 | "%s(): " fmt "\n", __func__, ##args) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD") Signed-off-by: Jerin Jacob --- drivers/net/memif/memif_socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/memif/memif_socket.c b/drivers/net/memif/memif_socket.c index 137033f68..6740e3471 100644 --- a/drivers/net/memif/memif_socket.c +++ b/drivers/net/memif/memif_socket.c @@ -918,7 +918,8 @@ memif_socket_create(struct pmd_internals *pmd, char *key, uint8_t listener) error: MIF_LOG(ERR, "%s: Failed to setup socket %s: %s", - rte_vdev_device_name(pmd->vdev), key, strerror(errno)); + rte_vdev_device_name(pmd->vdev) ? + rte_vdev_device_name(pmd->vdev) : "NULL", key, strerror(errno)); if (sock != NULL) rte_free(sock); if (sockfd >= 0) -- 2.22.0