From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 6D82DADA2 for ; Thu, 16 Apr 2015 14:56:14 +0200 (CEST) Received: by wizk4 with SMTP id k4so193626235wiz.1 for ; Thu, 16 Apr 2015 05:56:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=HIQenqLITcFDcJ4qSDMaz1iLANrj87AZ4RVMJKqDY98=; b=YaiYz8/REtuLIgIMCNK3brWxNJfJBZUFXjMGFIugXR/SOoYl+PLCXU/rbpgdC0G+aX NfL3mFafeIj7X3ujOQ3NmydLJ8aEXZfENJijJwp87fzADMPooj2fzYRoYtx9iGUSAzdO cZj4195fai0EKju2C6/UPkJ6dG9LQSCk1pLoTnOsSs8Smc150/A+RdaW7Ph0/Xefpq2C OBzmrdp0TBsBPRdphjXpna1Qh4g1Zx5+kpJ7H4USKaWqFeW67/jUdGNjrtblgVHytlAc 961I/scGEwU13CsSr5sE4AiXcTnpdUyKMO74wihwdGBXvsO9+ArubE9k6Bv2rvcUuvuQ Z05w== X-Gm-Message-State: ALoCoQmyU3g/BQkzkhCBEFCdaaKOEl8YsP1+s3IBRBILCq4OAbwTJMDjVLlTLO9G6dSc2i8eoXeY X-Received: by 10.180.10.71 with SMTP id g7mr4965252wib.75.1429188974268; Thu, 16 Apr 2015 05:56:14 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id 14sm10330898wjv.0.2015.04.16.05.56.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2015 05:56:13 -0700 (PDT) From: Thomas Monjalon To: Olivier MATZ Date: Thu, 16 Apr 2015 14:55:29 +0200 Message-ID: <5787146.HQ8pXXMOKN@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <552F8B09.9070000@6wind.com> References: <1958525.YbKd0lDtje@xps13> <1429130956-17828-2-git-send-email-thomas.monjalon@6wind.com> <552F8B09.9070000@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 2/2] use simple zero initializers 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: Thu, 16 Apr 2015 12:56:14 -0000 2015-04-16 12:12, Olivier MATZ: > On 04/15/2015 10:49 PM, Thomas Monjalon wrote: > > To initialize a structure with zeros, one field was explicitly set > > to avoid "missing initializer" bug with old GCC (e.g. 4.4). > > This warning is now disabled (commit ) for old versions of GCC, > > so the workarounds may be removed. > > > > These initializers should not be needed for static variables but they > > are still used to workaround an ICC bug (see commit b2595c4aa92d). > > > > There is one remaining exception where {0} initializer doesn't work cleanly, > > even with recent GCC: > > lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:735:9: > > error: missing braces around initializer [-Werror=missing-braces] > > struct rte_mbuf mb_def = {0}; /* zeroed mbuf */ > > > > Tested with GCC 4.4.7 (CentOS), 4.7.2 (Debian) and 4.9.2 (Arch). > > > > Signed-off-by: Thomas Monjalon > > I'm trying to compile the head of dpdk (without this patch applied), > and I have this error with clang: > > ixgbe_rxtx.c:2509:41: error: missing field 'driver_name' initializer > [-Werror,-Wmissing-field-initializers] > struct rte_eth_dev_info dev_info = { 0 }; > > I'm wondering if adding more {0} would compile on clang, at least with > the current clang flags. It's fixed by adding -Wno-missing-field-initializers to clang flags. Someone to test with ICC? Thanks