svn commit: r312216 - in head: sys/kern tests/sys/kern/acct
Bruce Evans
brde at optusnet.com.au
Sun Jan 15 09:45:26 UTC 2017
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
More information about the svn-src-head
mailing list