Date: Sun, 15 Jan 2017 20:45:15 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Ngie Cooper <ngie@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r312216 - in head: sys/kern tests/sys/kern/acct Message-ID: <20170115202828.R10440@besplex.bde.org> In-Reply-To: <201701150925.v0F9PXW8069572@repo.freebsd.org> References: <201701150925.v0F9PXW8069572@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 15 Jan 2017, Ngie Cooper wrote: > Log: > Revert r312119 and reword the intent to fix -Wshadow issues > between exp(3) and `exp` var. > > The approach taken previously was not ideal for multiple > functional and stylistic reasons. > > Add to existing sed call in Makefile to replace `exp` with > `exponent` instead. Thanks. > Modified: head/tests/sys/kern/acct/Makefile > ============================================================================== > --- head/tests/sys/kern/acct/Makefile Sun Jan 15 09:13:41 2017 (r312215) > +++ head/tests/sys/kern/acct/Makefile Sun Jan 15 09:25:33 2017 (r312216) > @@ -13,6 +13,7 @@ acct_test.o: convert.c > > convert.c: ${SRCTOP}/sys/kern/kern_acct.c > sed -n -e 's/log(/syslog(/g' \ > + -e 's/exp/expected/g' \ > -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp > mv ${.TARGET}.tmp ${.TARGET} Er, 'expected' is an unexpected spelling of 'exponent'.'. 'syslog' is a little dangerous too. log(9) is declared in systm.h and this renames it to syslog(9). syslog(3) is declared in syslog.h. The functions have the same API, but that is not enough for safety. Currently the result is a redeclaration that -Wredundant-decls should complain about. But any magic like the API being implemented as a macro would cause problems. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170115202828.R10440>