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 19CB343C5A; Wed, 6 Mar 2024 21:14:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 81A4D42E94; Wed, 6 Mar 2024 21:14:05 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 38FE3402EA for ; Wed, 6 Mar 2024 21:13:59 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 01D3D20B74C5; Wed, 6 Mar 2024 12:13:57 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 01D3D20B74C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1709756038; bh=EGzAYyHR4lf6Y48AOS2lru/JcXvrSeb2QJZdgWeMVLA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BhJHLYGnNCiFe4j0qrPnb52xjtnkxXlBtPk09DITGbx/o5jaPdaX6C2OMHQkl7FHL wGwrPXMm3Qj00LHSCEcpSBVH25rIpnLlDG058e6MI/k5fA8gNig31ovZRNHjjhLS9+ l5FfSGuyWCjDRD3Xdr905y6xRp3SNTQipJ+lLk70= 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 v5 5/6] lpm: replace zero length array with flex array Date: Wed, 6 Mar 2024 12:13:55 -0800 Message-Id: <1709756036-24068-6-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1709756036-24068-1-git-send-email-roretzla@linux.microsoft.com> References: <1706134657-17446-1-git-send-email-roretzla@linux.microsoft.com> <1709756036-24068-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 --- lib/lpm/rte_lpm6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c index 46d8f71..5cc1bb2 100644 --- a/lib/lpm/rte_lpm6.c +++ b/lib/lpm/rte_lpm6.c @@ -107,7 +107,7 @@ struct rte_lpm6 { struct rte_lpm_tbl8_hdr *tbl8_hdrs; /* array of tbl8 headers */ - alignas(RTE_CACHE_LINE_SIZE) struct rte_lpm6_tbl_entry tbl8[0]; + alignas(RTE_CACHE_LINE_SIZE) struct rte_lpm6_tbl_entry tbl8[]; /**< LPM tbl8 table. */ }; -- 1.8.3.1