From owner-svn-src-all@freebsd.org Sun Jan 15 09:45:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB0FBCA47E4; Sun, 15 Jan 2017 09:45:26 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 8ACF710C8; Sun, 15 Jan 2017 09:45:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 9F09542642B; Sun, 15 Jan 2017 20:45:16 +1100 (AEDT) Date: Sun, 15 Jan 2017 20:45:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ngie Cooper 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 In-Reply-To: <201701150925.v0F9PXW8069572@repo.freebsd.org> Message-ID: <20170115202828.R10440@besplex.bde.org> References: <201701150925.v0F9PXW8069572@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=H7qr+6Qi c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=t9cvuGNOZBUpZTa2tFkA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jan 2017 09:45:26 -0000 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