From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 868A78048 for ; Fri, 5 Dec 2014 16:57:20 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 05 Dec 2014 07:57:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,522,1413270000"; d="scan'208";a="643042949" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 05 Dec 2014 07:57:19 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id sB5FvDJu029519; Fri, 5 Dec 2014 15:57:13 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id sB5FvD3S023569; Fri, 5 Dec 2014 15:57:13 GMT Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id sB5FvCiB023565; Fri, 5 Dec 2014 15:57:12 GMT From: Bruce Richardson To: dev@dpdk.org, ssujith@cisco.com Date: Fri, 5 Dec 2014 15:57:11 +0000 Message-Id: <1417795032-23524-2-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1417795032-23524-1-git-send-email-bruce.richardson@intel.com> References: <1417795032-23524-1-git-send-email-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH 1/2] enic: fix initialization error with clang 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: Fri, 05 Dec 2014 15:57:21 -0000 This patch fixes the following compiler error raised by clang 3.3 on FreeBSD 10: CC enic_clsf.o /usr/home/bruce/dpdk.org/lib/librte_pmd_enic/enic_clsf.c:99:25: fatal error: missing field 'u' initializer [-Wmissing-field-initializers] struct filter fltr = {0}; It fixes it by changing the initializer to set a named field to zero, thereby automatically setting the rest of the unnamed fields also to zero. Signed-off-by: Bruce Richardson --- lib/librte_pmd_enic/enic_clsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pmd_enic/enic_clsf.c b/lib/librte_pmd_enic/enic_clsf.c index 30a4def..577a382 100644 --- a/lib/librte_pmd_enic/enic_clsf.c +++ b/lib/librte_pmd_enic/enic_clsf.c @@ -96,7 +96,7 @@ int enic_fdir_add_fltr(struct enic *enic, struct rte_fdir_filter *params, u16 queue, u8 drop) { struct enic_fdir_node *key; - struct filter fltr = {0}; + struct filter fltr = {.type = 0}; int32_t pos; u8 do_free = 0; u16 old_fltr_id = 0; -- 2.1.0