Date: Sat, 20 Oct 2018 22:39:35 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> 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 Message-ID: <201810202239.w9KMdZpQ072372@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810202239.w9KMdZpQ072372>