From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH V2 1/4] x86/kvm: Resolve some missing-initializers warnings Date: Thu, 31 Jul 2014 18:50:26 +0200 Message-ID: <53DA73D2.8030404@redhat.com> References: <1406294825-21393-1-git-send-email-jeffrey.t.kirsher@intel.com> <20140730211845.127128.56203.stgit@mdrustad-wks.jf.intel.com> <53DA2D8D.9070903@redhat.com> <3BBCD2CE-7970-40CF-A9C0-8597D3D3CF25@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "gleb@kernel.org" , "Kirsher, Jeffrey T" , "kvm@vger.kernel.org" To: "Rustad, Mark D" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28378 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbaGaQuc (ORCPT ); Thu, 31 Jul 2014 12:50:32 -0400 In-Reply-To: <3BBCD2CE-7970-40CF-A9C0-8597D3D3CF25@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 31/07/2014 18:35, Rustad, Mark D ha scritto: > I agree it is ugly. .name = NULL would be enough to silence it. Would > that be better? At the moment I am thinking of this as a test case > for the other 1000 { } and {0} initializers in the kernel that are > throwing warnings. I know we both agree that the compiler really > shouldn't be warning on them, but they currently make a lot noise. > > How would you feel about a macro called something like ZERO_ENTRY > defined something like: > > #define ZERO_ENTRY DIAG_PUSH DIAG_IGNORE(missing-field-initializers) > { } DIAG_POP > > Where the DIAG_ macros pretty much do what you think. I have another > patch series that Jeff hasn't gotten to yet that defines such macros. > Of course they get put to good use. > > At this point, I'll put the terminator back the way it was, but I > would still like your opinion on the macro approach to addressing all > of these terminators. If you get such a macro in include/linux, I will of course accept its usage. Paolo