Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-30 Thread Joerg Sonnenberger
On Sun, Aug 30, 2015 at 11:53:00AM +0200, Ed Schouten wrote: > 2015-08-28 16:38 GMT+02:00 Joerg Sonnenberger : > > But the compiler can't tell if it is the *intention* that the function > > never returns. The warning behavior exists because that can easily > > change with macros etc. > > I think i

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-30 Thread Joerg Sonnenberger
On Sun, Aug 30, 2015 at 03:36:27PM +1000, Bruce Evans wrote: > On Fri, 28 Aug 2015, Joerg Sonnenberger wrote: > > >On Fri, Aug 28, 2015 at 10:17:56PM +1000, Bruce Evans wrote: > >>>-static void die(int); > >>>+static void die(int) __dead2; > >> > >>Since the function is static, it is v

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-30 Thread Bruce Evans
On Sun, 30 Aug 2015, Jilles Tjoelker wrote: On Sun, Aug 30, 2015 at 11:53:00AM +0200, Ed Schouten wrote: 2015-08-28 16:38 GMT+02:00 Joerg Sonnenberger : But the compiler can't tell if it is the *intention* that the function never returns. The warning behavior exists because that can easily cha

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-30 Thread Jilles Tjoelker
On Sun, Aug 30, 2015 at 11:53:00AM +0200, Ed Schouten wrote: > 2015-08-28 16:38 GMT+02:00 Joerg Sonnenberger : > > But the compiler can't tell if it is the *intention* that the function > > never returns. The warning behavior exists because that can easily > > change with macros etc. > I think it'

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-30 Thread Ed Schouten
2015-08-28 16:38 GMT+02:00 Joerg Sonnenberger : > But the compiler can't tell if it is the *intention* that the function > never returns. The warning behavior exists because that can easily > change with macros etc. I think it's important to keep in mind what this keyword was designed for. The id

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-29 Thread Bruce Evans
On Fri, 28 Aug 2015, Joerg Sonnenberger wrote: On Fri, Aug 28, 2015 at 10:17:56PM +1000, Bruce Evans wrote: -static voiddie(int); +static voiddie(int) __dead2; Since the function is static, it is very easy for the compiler to see that it doesn't return. But the compiler can't tell i

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-28 Thread Joerg Sonnenberger
On Fri, Aug 28, 2015 at 10:17:56PM +1000, Bruce Evans wrote: > >-static void die(int); > >+static void die(int) __dead2; > > Since the function is static, it is very easy for the compiler to see > that it doesn't return. But the compiler can't tell if it is the *intention* that the function never

Re: svn commit: r287217 - head/usr.sbin/syslogd

2015-08-28 Thread Bruce Evans
On Thu, 27 Aug 2015, Xin LI wrote: Log: die() would never return, mark it as so. Why? (Except to add a style bug.) Modified: head/usr.sbin/syslogd/syslogd.c == --- head/usr.sbin/syslogd/syslogd.c Thu Aug 27 17: