From owner-svn-src-head@freebsd.org Thu Jun 13 08:43:20 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C28F15D06D6; Thu, 13 Jun 2019 08:43:20 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay118.isp.belgacom.be (mailrelay118.isp.belgacom.be [195.238.20.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB1417224A; Thu, 13 Jun 2019 08:43:19 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AzAACoCwJd/1H1sVtmGwEBAQEDAQE?= =?us-ascii?q?BBwMBAQGBUQYBAQELAQGCD0cSEVIgEiiEFogcX4l4AQGCDDUBigiOI4F7CQE?= =?us-ascii?q?BAgEBAQEBKwwBAYRAAoJFJDQJDgEDAQEFAQEBAQRtHAxCAQwBhHsBBSMzIxA?= =?us-ascii?q?LDgYEAgIFIQICD0gGE4Mjgg4LqguBMYQyAQsBhGOBCgaBDCgBi3OBf4QjPoR?= =?us-ascii?q?EgwqCWASOA5tGCYIShkeMeCeXKYQLkCiRLTiBWE0wCIMnghsXiGGFQT0DMIQ?= =?us-ascii?q?PjDkBAQ?= X-IPAS-Result: =?us-ascii?q?A2AzAACoCwJd/1H1sVtmGwEBAQEDAQEBBwMBAQGBUQYBA?= =?us-ascii?q?QELAQGCD0cSEVIgEiiEFogcX4l4AQGCDDUBigiOI4F7CQEBAgEBAQEBKwwBA?= =?us-ascii?q?YRAAoJFJDQJDgEDAQEFAQEBAQRtHAxCAQwBhHsBBSMzIxALDgYEAgIFIQICD?= =?us-ascii?q?0gGE4Mjgg4LqguBMYQyAQsBhGOBCgaBDCgBi3OBf4QjPoREgwqCWASOA5tGC?= =?us-ascii?q?YIShkeMeCeXKYQLkCiRLTiBWE0wCIMnghsXiGGFQT0DMIQPjDkBAQ?= Received: from 81.245-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.245.81]) by relay.skynet.be with ESMTP; 13 Jun 2019 10:43:12 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x5D8hBxm024159; Thu, 13 Jun 2019 10:43:11 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Thu, 13 Jun 2019 10:43:10 +0200 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Warner Losh Cc: Gleb Smirnoff , Dmitry Chagin , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r348847 - head/sys/sys Message-ID: <20190613104310.1b0f8f70@kalimero.tijl.coosemans.org> In-Reply-To: References: <201906100528.x5A5S4gm072561@repo.freebsd.org> <20190610110909.3e6fbc13@kalimero.tijl.coosemans.org> <20190612224255.GA67242@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: AB1417224A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jun 2019 08:43:20 -0000 On Wed, 12 Jun 2019 16:51:03 -0600 Warner Losh wrote: > On Wed, Jun 12, 2019 at 4:49 PM Gleb Smirnoff wrote: >> On Mon, Jun 10, 2019 at 11:09:09AM +0200, T=C4=B3l Coosemans wrote: =20 >>>> Date: Mon Jun 10 05:28:03 2019 >>>> New Revision: 348847 >>>> URL: https://svnweb.freebsd.org/changeset/base/348847 >>>> >>>> Log: >>>> Use C11 anonymous unions. >>>> >>>> PR: 215202 >>>> Reported by: glebius >>>> MFC after: 2 weeks >>>> >>>> Modified: >>>> head/sys/sys/ucred.h >>>> >>>> Modified: head/sys/sys/ucred.h >>>> =20 >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =20 >>>> --- head/sys/sys/ucred.h Mon Jun 10 05:09:34 2019 (r348846) >>>> +++ head/sys/sys/ucred.h Mon Jun 10 05:28:03 2019 (r348847) >>>> @@ -89,12 +89,11 @@ struct xucred { >>>> gid_t cr_groups[XU_NGROUPS]; /* groups */ >>>> union { >>>> void *_cr_unused1; /* compatibility with old ucred */ >>>> - pid_t _pid; >>>> - } _cr; >>>> + pid_t cr_pid; >>>> + }; >>>> }; >>>> #define XUCRED_VERSION 0 >>>> >>>> -#define cr_pid _cr._pid >>>> /* This can be used for both ucred and xucred structures. */ >>>> #define cr_gid cr_groups[0] =20 >>> >>> Isn't this a userland header that should work with non-C11 compilers? = =20 >> >> It could make sense to keep such low bar for standard headers, but ucred= .h >> is BSD-specific header and struct xucred is FreeBSD specific. >=20 > This is solvable with proper visibility, I'd think.. I think "union {" should be replaced with "__extension__ union {". That seems to kill this warning: /usr/include/sys/ucred.h:90:2: warning: anonymous unions are a C11 extension [-Wc11-extensions] union { ^ 1 warning generated.