From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2CA64432EA; Thu, 9 Nov 2023 21:13:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1533140EDF; Thu, 9 Nov 2023 21:13:42 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7491E402EA for ; Thu, 9 Nov 2023 21:13:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id D066320B74C0; Thu, 9 Nov 2023 12:13:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D066320B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1699560819; bh=Qd4ISbFfGN4Xl164XhK8xgvrBqiOj8feNNYb46RTa+E=; h=From:To:Cc:Subject:Date:From; b=p0ztsRM9h/7LkZMHfKAVCH2pJz0+yhta0QEyQbMX+k1ma3VkFcy1Gk2Ep7rP4QV97 ueMwkFYWv6avGmmgC72v6xPU4M9MVr6I1wFw26J0b1y/sJ9NSjnGL9R4A38hOgBb37 tpSYW5qdNu0jcBr0gnMYccR4/2XxvPkFSKMhWTYI= From: Tyler Retzlaff To: dev@dpdk.org Cc: Andrew Rybchenko , Cristian Dumitrescu , Ferruh Yigit , Thomas Monjalon , Tyler Retzlaff Subject: [PATCH] ethdev: add extension keyword to statement expression macro Date: Thu, 9 Nov 2023 12:13:38 -0800 Message-Id: <1699560818-7453-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org add missing __extension__ keyword to macros using gcc statement expression extension. Signed-off-by: Tyler Retzlaff --- lib/ethdev/rte_mtr.c | 10 +++++----- lib/ethdev/rte_tm.c | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c index 4e94af9..900837b 100644 --- a/lib/ethdev/rte_mtr.c +++ b/lib/ethdev/rte_mtr.c @@ -41,14 +41,14 @@ } #define RTE_MTR_FUNC(port_id, func) \ -({ \ +__extension__ ({ \ const struct rte_mtr_ops *ops = \ - rte_mtr_ops_get(port_id, error); \ - if (ops == NULL) \ + rte_mtr_ops_get(port_id, error); \ + if (ops == NULL) \ return -rte_errno; \ \ if (ops->func == NULL) \ - return -rte_mtr_error_set(error, \ + return -rte_mtr_error_set(error, \ ENOSYS, \ RTE_MTR_ERROR_TYPE_UNSPECIFIED, \ NULL, \ @@ -58,7 +58,7 @@ }) #define RTE_MTR_HNDL_FUNC(port_id, func) \ -({ \ +__extension__ ({ \ const struct rte_mtr_ops *ops = \ rte_mtr_ops_get(port_id, error); \ if (ops == NULL) \ diff --git a/lib/ethdev/rte_tm.c b/lib/ethdev/rte_tm.c index 2d08141..d594fe0 100644 --- a/lib/ethdev/rte_tm.c +++ b/lib/ethdev/rte_tm.c @@ -40,11 +40,11 @@ return ops; } -#define RTE_TM_FUNC(port_id, func) \ -({ \ +#define RTE_TM_FUNC(port_id, func) \ +__extension__ ({ \ const struct rte_tm_ops *ops = \ rte_tm_ops_get(port_id, error); \ - if (ops == NULL) \ + if (ops == NULL) \ return -rte_errno; \ \ if (ops->func == NULL) \ -- 1.8.3.1