Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread Bruce Evans
On Thu, 28 Jun 2018, David Bright wrote: Log: Remove potential identifier conflict in the EV_SET macro. PR43905 pointed out a problem with the EV_SET macro if the passed struct kevent pointer were specified with an expression with side effects (e.g., "kevp++"). This was fixed in rS110241, b

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread David A. Bright
On 06/28/2018 01:45 PM, Justin Hibbits wrote: >> Author: dab >> Date: Thu Jun 28 17:01:04 2018 >> New Revision: 335765 > > This breaks gcc builds, with the following errors: Fixed in r335776. Thanks to cem@ for a suggested fix (and to others that also suggested alternative fixes) and to jhibbi

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread Ed Schouten
2018-06-28 21:09 GMT+02:00 Conrad Meyer : > I think the right initializer is something like: > > *(kevp_) = (struct kevent) { > ... > .ext = { > [0] = 0, > [1] = 0, > ... > }, > }; The nice thing about using an inline function is that you can get rid of the compound literal: static __inline v

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread Conrad Meyer
I think the right initializer is something like: *(kevp_) = (struct kevent) { ... .ext = { [0] = 0, [1] = 0, ... }, }; (I.e., use a C99 array static initializer to initialize the array member of struct kevent.) Best, Conrad On Thu, Jun 28, 2018 at 11:45 AM, Justin Hibbits wrote: > Hi David

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread Ed Schouten
Hi David, 2018-06-28 19:01 GMT+02:00 David Bright : > +#define EV_SET(kevp_, a, b, c, d, e, f) do { \ Some time ago I also looked into this and realised that it may even be possible to do something like this: static __inline void EV_SET(...) { } /* Compatibility for code that tests #ifdef EV_

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread David A. Bright
On 06/28/2018 02:04 PM, Bryan Drewery wrote: > On 6/28/2018 11:45 AM, Justin Hibbits wrote: >> Hi David, >> 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field >> overwritten >> 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization >> for '(anonymous).ext') >> >>

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread Bryan Drewery
On 6/28/2018 11:45 AM, Justin Hibbits wrote: > Hi David, > > On Thu, Jun 28, 2018 at 12:01 PM David Bright wrote: >> >> Author: dab >> Date: Thu Jun 28 17:01:04 2018 >> New Revision: 335765 >> URL: https://svnweb.freebsd.org/changeset/base/335765 >> >> Log: >> Remove potential identifier confli

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread Justin Hibbits
Hi David, On Thu, Jun 28, 2018 at 12:01 PM David Bright wrote: > > Author: dab > Date: Thu Jun 28 17:01:04 2018 > New Revision: 335765 > URL: https://svnweb.freebsd.org/changeset/base/335765 > > Log: > Remove potential identifier conflict in the EV_SET macro. > > PR43905 pointed out a problem

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread David A. Bright
On 06/28/2018 12:06 PM, David A. Bright wrote: > On 06/28/2018 12:01 PM, David Bright wrote: > >> Author: dab >> Date: Thu Jun 28 17:01:04 2018 >> New Revision: 335765 >> URL: https://svnweb.freebsd.org/changeset/base/335765 >> >> Log: >> Remove potential identifier conflict in the EV_SET macro.

Re: svn commit: r335765 - head/sys/sys

2018-06-28 Thread David A. Bright
On 06/28/2018 12:01 PM, David Bright wrote: > Author: dab > Date: Thu Jun 28 17:01:04 2018 > New Revision: 335765 > URL: https://svnweb.freebsd.org/changeset/base/335765 > > Log: > Remove potential identifier conflict in the EV_SET macro. > > > Differential Revision: > https://bugs.fr

svn commit: r335765 - head/sys/sys

2018-06-28 Thread David Bright
Author: dab Date: Thu Jun 28 17:01:04 2018 New Revision: 335765 URL: https://svnweb.freebsd.org/changeset/base/335765 Log: Remove potential identifier conflict in the EV_SET macro. PR43905 pointed out a problem with the EV_SET macro if the passed struct kevent pointer were specified with