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 40FF043BAD; Thu, 29 Feb 2024 23:59:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B447242FA5; Thu, 29 Feb 2024 23:58:59 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B4AD842DBD for ; Thu, 29 Feb 2024 23:58:55 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DC95B20B74C4; Thu, 29 Feb 2024 14:58:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DC95B20B74C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709247534; bh=lNzMhLvW5ioZm0BzUrnsooeJA+PYOUCDszLUIqvB9yU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JBDMD237NFOvq9+2c/YHLMo9ordzPypkfk1l8HbOR8OknCuLbSuV9t8ihwNM3F2mb fST2O407Rx86vYrwr9EMqq8oKycGWDZGJd2rm1DXaoiMTT1D2RRrH43+Qonhgg2jEO +rccIQunbTsHDgCykUcPJG8yzQXUg1jEBMVZgD6g= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Cristian Dumitrescu , Honnappa Nagarahalli , Sameh Gobriel , Vladimir Medvedkin , Yipeng Wang , mb@smartsharesystems.com, fengchengwen@huawei.com, Tyler Retzlaff Subject: [PATCH v4 3/6] fib: replace zero length array with flex array Date: Thu, 29 Feb 2024 14:58:50 -0800 Message-Id: <1709247533-32698-4-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709247533-32698-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1709247533-32698-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Zero length arrays are GNU extension. Replace with standard flex array. Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup Acked-by: Stephen Hemminger --- lib/fib/dir24_8.h | 2 +- lib/fib/trie.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fib/dir24_8.h b/lib/fib/dir24_8.h index b0d1a40..5a7b6dd 100644 --- a/lib/fib/dir24_8.h +++ b/lib/fib/dir24_8.h @@ -32,7 +32,7 @@ struct dir24_8_tbl { uint64_t *tbl8; /**< tbl8 table. */ uint64_t *tbl8_idxes; /**< bitmap containing free tbl8 idxes*/ /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline void * diff --git a/lib/fib/trie.h b/lib/fib/trie.h index 3cf161a..71ed191 100644 --- a/lib/fib/trie.h +++ b/lib/fib/trie.h @@ -36,7 +36,7 @@ struct rte_trie_tbl { uint32_t *tbl8_pool; /**< bitmap containing free tbl8 idxes*/ uint32_t tbl8_pool_pos; /* tbl24 table. */ - __extension__ uint64_t tbl24[0] __rte_cache_aligned; + uint64_t tbl24[] __rte_cache_aligned; }; static inline uint32_t -- 1.8.3.1