svn commit: r339505 - in head: lib/libc/gmon sys/libkern
Ed Maste
emaste at FreeBSD.org
Sat Oct 20 22:39:36 UTC 2018
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;
More information about the svn-src-all
mailing list