From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 2/2] use simple zero initializers Date: Mon, 20 Apr 2015 14:45:12 +0200 Message-ID: <1602194.3mSZX90Ns8@xps13> References: <1429130956-17828-1-git-send-email-thomas.monjalon@6wind.com> <1429222237-8002-2-git-send-email-thomas.monjalon@6wind.com> <553365CD.5070407@cloudius-systems.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <553365CD.5070407-RmZWMc9puTNJc61us3aD9laTQe2KTcn/@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > > 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), gcc-4.7.2 (Debian), gcc-4.9.2 (Arch), > > clang-3.6.0 and icc-13.1.1. > > > > Signed-off-by: Thomas Monjalon > > Tested-by: Thomas Monjalon > > Tested-by: John McNamara > > Acked-by: Vlad Zolotarov Applied, thanks