From owner-svn-src-head@freebsd.org Sat Oct 20 22:39:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D89DFF923C; Sat, 20 Oct 2018 22:39:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA518E31A; Sat, 20 Oct 2018 22:39:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1890C24689; Sat, 20 Oct 2018 22:39:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9KMdZQf072374; Sat, 20 Oct 2018 22:39:35 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9KMdZpQ072372; Sat, 20 Oct 2018 22:39:35 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201810202239.w9KMdZpQ072372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 20 Oct 2018 22:39:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339505 - in head: lib/libc/gmon sys/libkern X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: lib/libc/gmon sys/libkern X-SVN-Commit-Revision: 339505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2018 22:39:36 -0000 Author: emaste Date: Sat Oct 20 22:39:35 2018 New Revision: 339505 URL: https://svnweb.freebsd.org/changeset/base/339505 Log: mcount: tidy up ANSIfication libc/gmon's mcount was ANSIfied in r124180, with libkern following over a decade later, in r325988, but some minor discrepancies remained. Update libc/gmon's mexitcount to an ANSI C function definition, and use (void) for libkern-only functions that take no arguments. Reported by: bde Modified: head/lib/libc/gmon/mcount.c head/sys/libkern/mcount.c Modified: head/lib/libc/gmon/mcount.c ============================================================================== --- head/lib/libc/gmon/mcount.c Sat Oct 20 22:35:06 2018 (r339504) +++ head/lib/libc/gmon/mcount.c Sat Oct 20 22:39:35 2018 (r339505) @@ -279,8 +279,7 @@ MCOUNT #ifdef GUPROF void -mexitcount(selfpc) - uintfptr_t selfpc; +mexitcount(uintfptr_t selfpc) { struct gmonparam *p; uintfptr_t selfpcdiff; Modified: head/sys/libkern/mcount.c ============================================================================== --- head/sys/libkern/mcount.c Sat Oct 20 22:35:06 2018 (r339504) +++ head/sys/libkern/mcount.c Sat Oct 20 22:39:35 2018 (r339505) @@ -58,7 +58,8 @@ __FBSDID("$FreeBSD$"); * both frompcindex and frompc. Any reasonable, modern compiler will * perform this optimization. */ -_MCOUNT_DECL(uintfptr_t frompc, uintfptr_t selfpc) /* _mcount; may be static, inline, etc */ +/* _mcount; may be static, inline, etc */ +_MCOUNT_DECL(uintfptr_t frompc, uintfptr_t selfpc) { #ifdef GUPROF int delta; @@ -291,7 +292,7 @@ mexitcount(uintfptr_t selfpc) #endif void -empty_loop() +empty_loop(void) { int i; @@ -300,13 +301,13 @@ empty_loop() } void -nullfunc() +nullfunc(void) { __asm __volatile(""); } void -nullfunc_loop() +nullfunc_loop(void) { int i;