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
This commit is contained in:
Ed Maste 2018-10-20 22:39:35 +00:00
parent 188b0da1ce
commit 05bc9aa78f
2 changed files with 6 additions and 6 deletions

View File

@ -279,8 +279,7 @@ MCOUNT
#ifdef GUPROF
void
mexitcount(selfpc)
uintfptr_t selfpc;
mexitcount(uintfptr_t selfpc)
{
struct gmonparam *p;
uintfptr_t selfpcdiff;

View File

@ -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;