Adjust function definitions in kern_resource.c to avoid clang 15 warnings

With clang 15, the following -Werror warnings are produced:

    sys/kern/kern_resource.c:1212:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    lim_alloc()
             ^
              void
    sys/kern/kern_resource.c:1365:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    uihashinit()
              ^
               void

This is because lim_alloc() and uihashinit() are declared with (void)
argument lists, but defined with empty argument lists. Make the
definitions match the declarations.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2022-07-26 16:14:50 +02:00
parent db8ea61ae2
commit f2eb09b089

View file

@ -1209,7 +1209,7 @@ rufetchcalc(struct proc *p, struct rusage *ru, struct timeval *up,
* reference count and mutex pointer.
*/
struct plimit *
lim_alloc()
lim_alloc(void)
{
struct plimit *limp;
@ -1362,7 +1362,7 @@ lim_rlimit_proc(struct proc *p, int which, struct rlimit *rlp)
}
void
uihashinit()
uihashinit(void)
{
uihashtbl = hashinit(maxproc / 16, M_UIDINFO, &uihash);