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 9572DA0548; Thu, 2 Jun 2022 17:09:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 838F740E50; Thu, 2 Jun 2022 17:09:49 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id C7EE540E09 for ; Thu, 2 Jun 2022 17:09:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654182588; x=1685718588; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yhUqXQdJEuiFkqm2dZgLofyyAG+uIXLypkKKS27oFXY=; b=A8kGeLbmsvPcaReC0bLDpVp2bARNkEDmWtN22BhJReaEMunZsjXJHMAR +hLM+X8mHPM6IxMY8GBZuHa1PbLAeMih9iBWlCC5J7ucI213k9d5hafwj 46IK4xsYMQlBMb9a0y7uxSP11ZIOwknGQkAFm1cHObRvjiPZFqV8tfeo1 USpcJntV47yN9sIG1dYQ03OHyFWrAFHkbBay7FldVwToEUIVk6Qr+qN5V WhkZSPZ13KN9syGi9czWzOpZhyAZClJdj9t9dI6oqqqmgXSpMPQyxMR3U /YLR6z1z9DuAtH8YCrCK9b0WjL8N/qOPDliPCc82fDCoMkZhcJJvi5KVB g==; X-IronPort-AV: E=McAfee;i="6400,9594,10365"; a="301343820" X-IronPort-AV: E=Sophos;i="5.91,271,1647327600"; d="scan'208";a="301343820" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2022 08:09:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,271,1647327600"; d="scan'208";a="905026034" Received: from silpixa00401385.ir.intel.com (HELO silpixa00401385.ger.corp.intel.com.) ([10.237.222.171]) by fmsmga005.fm.intel.com with ESMTP; 02 Jun 2022 08:08:56 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, stephen@networkplumber.org, Bruce Richardson Subject: [PATCH 4/4] app: examples: replace zero-length arrays with undimensioned ones Date: Thu, 2 Jun 2022 16:08:34 +0100 Message-Id: <20220602150834.643745-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220602150834.643745-1-bruce.richardson@intel.com> References: <20220602150834.643745-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 This patch replaces instances of zero-sized arrays i.e. those at the end of structures with "[0]" with the more standard syntax of "[]". Replacement was done using coccinelle script, with some cleanup of whitespace afterwards. Signed-off-by: Bruce Richardson --- app/test/test_table_tables.c | 2 +- examples/ip_reassembly/main.c | 2 +- examples/ptpclient/ptpclient.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c index 010dd5a794..26908e6112 100644 --- a/app/test/test_table_tables.c +++ b/app/test/test_table_tables.c @@ -53,7 +53,7 @@ struct rte_bucket_4_8 { uint64_t next_valid; uint64_t key[4]; /* Cache line 1 */ - uint8_t data[0]; + uint8_t data[]; }; #if RTE_TABLE_HASH_LRU_STRATEGY == 3 diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index 6e4c11c3c7..3ebf895aa0 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -126,7 +126,7 @@ struct mbuf_table { uint32_t len; uint32_t head; uint32_t tail; - struct rte_mbuf *m_table[0]; + struct rte_mbuf *m_table[]; }; struct rx_queue { diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index de799f698b..1f1c9c9c52 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -90,7 +90,7 @@ struct sync_msg { struct follow_up_msg { struct ptp_header hdr; struct tstamp precise_origin_tstamp; - uint8_t suffix[0]; + uint8_t suffix[]; } __rte_packed; struct delay_req_msg { @@ -102,7 +102,7 @@ struct delay_resp_msg { struct ptp_header hdr; struct tstamp rx_tstamp; struct port_id req_port_id; - uint8_t suffix[0]; + uint8_t suffix[]; } __rte_packed; struct ptp_message { -- 2.34.1