From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 805345947 for ; Wed, 15 Jul 2015 14:41:16 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 15 Jul 2015 05:40:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,480,1432623600"; d="scan'208";a="763002323" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 15 Jul 2015 05:40:45 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t6FCei1f012568 for ; Wed, 15 Jul 2015 13:40:44 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t6FCehLU005775 for ; Wed, 15 Jul 2015 13:40:43 +0100 Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id t6FCehfa005769 for dev@dpdk.org; Wed, 15 Jul 2015 13:40:43 +0100 From: Pablo de Lara To: dev@dpdk.org Date: Wed, 15 Jul 2015 13:40:42 +0100 Message-Id: <1436964043-5729-2-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1436964043-5729-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1436964043-5729-1-git-send-email-pablo.de.lara.guarch@intel.com> Subject: [dpdk-dev] [PATCH] hash: fix compilation for gcc 4.4/4.5 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2015 12:41:17 -0000 gcc 4.4 and 4.5 throws following error: rte_cuckoo_hash.c:145: error: flexible array member in otherwise empty struct. This is due to empty length in flexible array, which has been changed to use size 0 in the declaration of the array. Fixes: 48a399119619 ("hash: replace with cuckoo hash implementation") Reported-by: Olga Shern Signed-off-by: Pablo de Lara --- lib/librte_hash/rte_cuckoo_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c index 39cafb7..80cb126 100644 --- a/lib/librte_hash/rte_cuckoo_hash.c +++ b/lib/librte_hash/rte_cuckoo_hash.c @@ -142,7 +142,7 @@ struct rte_hash_key { void *pdata; }; /* Variable key size */ - char key[]; + char key[0]; } __attribute__((aligned(KEY_ALIGNMENT))); /** Bucket structure */ -- 2.4.2