From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Vesely Subject: Re: [PATCH] configure.ac: disable annoying warning -Wmissing-field-initializers Date: Fri, 22 Jan 2016 14:18:13 -0500 Message-ID: <1453490293.24549.2.camel@rutgers.edu> References: <20160122174700.GP23290@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2118696519==" Return-path: Received: from mail-qg0-f52.google.com (mail-qg0-f52.google.com [209.85.192.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id D589B6ECC8 for ; Fri, 22 Jan 2016 11:18:24 -0800 (PST) Received: by mail-qg0-f52.google.com with SMTP id o11so64960966qge.2 for ; Fri, 22 Jan 2016 11:18:24 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Ilia Mirkin , Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= Cc: Emil Velikov , ML dri-devel List-Id: dri-devel@lists.freedesktop.org --===============2118696519== Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-J/uDjXKw2qOgDbTCtpId" --=-J/uDjXKw2qOgDbTCtpId Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2016-01-22 at 12:48 -0500, Ilia Mirkin wrote: > On Fri, Jan 22, 2016 at 12:47 PM, Ville Syrj=C3=A4l=C3=A4 > wrote: > > On Fri, Jan 22, 2016 at 05:40:54PM +0000, Emil Velikov wrote: > > > On 22 January 2016 at 17:29, Ilia Mirkin > > > wrote: > > > > On Fri, Jan 22, 2016 at 12:18 PM, Marek Ol=C5=A1=C3=A1k > > > > wrote: > > > > > On Fri, Jan 22, 2016 at 6:13 PM, Emil Velikov > > > > @gmail.com> wrote: > > > > > > On 21 January 2016 at 16:58, Marek Ol=C5=A1=C3=A1k > > > > > > wrote: > > > > > > > On Thu, Jan 21, 2016 at 2:09 PM, Emil Velikov > > > > > > ikov@gmail.com> wrote: > > > > > > > > On 21 January 2016 at 12:08, Marek Ol=C5=A1=C3=A1k > > > > > > > com> wrote: > > > > > > > > > On Thu, Jan 21, 2016 at 11:51 AM, Emil Velikov > > > > > > > > l.velikov@gmail.com> wrote: > > > > > > > > > > On 18 January 2016 at 22:53, Marek Ol=C5=A1=C3=A1k > > > > > > > > > ail.com> wrote: > > > > > > > > > > > Try explaining that to people who have a > > > > > > > > > > > compulsion to fix them or > > > > > > > > > > > argue about them. :) Ignore? REALLY? IGNORE??? > > > > > > > > > > >=20 > > > > > > > > > > Now that we have a few people off your back can you > > > > > > > > > > please point out > > > > > > > > > > where this triggers warnings ? > > > > > > > > >=20 > > > > > > > > > This particular warning is trigged by {} > > > > > > > > As mentioned previously neither {} nor {0} trigger any > > > > > > > > warning here. > > > > > > > > Jani hinted that you might be using an old (buggy?) > > > > > > > > compiler which > > > > > > > > generates them. > > > > > > > > Which version of GCC are you using ? Do you mind > > > > > > > > showing the first few > > > > > > > > warnings ? > > > > > > > >=20 > > > > > > > > > or any { ... } which doesn't > > > > > > > > > initialize all members. > > > > > > > > >=20 > > > > > > > > Do we have any outside of intel_decode.c ? I'm failing > > > > > > > > to spot any. > > > > > > >=20 > > > > > > > amdgpu_bo.c has 7 occurences of "=3D {}" and they all print > > > > > > > the warning. > > > > > > With 200+ cases of memset and 40+ of "=3D *{ *0 *}". Any > > > > > > objections if I > > > > > > send a patch to transition to either one of these two ? > > > > >=20 > > > > > That's up to you, but please note that I don't plan to stop > > > > > using "=3D {}", > > > > > because it's the most convenient way to clear memory in a lot > > > > > of > > > > > cases and takes only 4 bytes of text. > > > >=20 > > > > I like {} too and think we should encourage that. I'd rather > > > > transition the { 0 } stuff over to {}. > > > >=20 > > > So people feel against seeing/writing single extra character 0, > > > despite that the warning has helped catch actual bug ? > > > And now are willing to transitions 40+ cases as opposed to ~15... > > > that > > > feels strange to say the least. > >=20 > > Does the '=3D { 0 }' thing even work if the first member happens to > > be > > something other than an integer? >=20 > No. That's why I like {}. Otherwise you end up doing > {{{{{{{{{{0}}}}}}}}}. ISO C99 According to 6.7.8 20 all braces but the outermost ones are optional. {}, on the other hand, is not allowed by syntax rules. Jan >=20 > =C2=A0 -ilia > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel --=20 Jan Vesely --=-J/uDjXKw2qOgDbTCtpId Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJWooB1AAoJEDhUsXb6ZiH/PZ8P+gJg0pOynZbBvVkj+pyRYIil G7f5CEAfc+i/+RjeES6X0Gg8aUt78dGx20zk/CgGe1SIMRZiXaAplwFOv3xe93jS 3cL15bY7GLQAB4SLTS2BY70dXNDyuUrszgBfE28flAMi9qnmlQsalkHL27SFrl77 t+X/FOk4QFbEdLOuAB/Em9FmNGJ/d9tvSK2nxevhKmdK+NV+7RmJr1M+GCshYEYQ 8H4aJvTd/hCuuu++dJ4WXmJ3GjdWcGfprt8ZB1Z5LtxjKHq9OjJrJ6g3IGYD+za2 lsFcW8Xg7mvtYCRSfK5uEMQQC71vqQfDg0nFoEXuIuOe1InA2qgcLZUxu9n0xgcr 7tMaAfBVjWq3F1Eaajhxhxjpl6A4f+091DXhX3PXAuU5zIUz0d3AAg0qljQdce0R 6oLmjlUmBIUYGziffGBXn2EQEgrycFYZDScQmyrloVaukOdbg5lNEZv2x3JB1yp7 2ZSLs+zAYT6ii/7OjK/IfDTBZH/5GY+iQBO0QkeKHUCeYn71Km9A3ZUCNzRCesxd BO1ZnsK02/ODlDRReYutGI2gvFiFNlfv9Y4nuplP2zETDJRx4eSXcWtvQxKpdwkt 3op65OPG1CgeuwbdlIhFVQUIkYMC+U39Me14rWkuVxEdkoWw4W38CXl2Cu7R8yut fKKCVu/m81wljmx/CiL9 =TGvX -----END PGP SIGNATURE----- --=-J/uDjXKw2qOgDbTCtpId-- --===============2118696519== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============2118696519==--