]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Adjust function definitions in kern_resource.c to avoid clang 15 warnings
authorDimitry Andric <dim@FreeBSD.org>
Tue, 26 Jul 2022 14:14:50 +0000 (16:14 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Fri, 29 Jul 2022 18:29:08 +0000 (20:29 +0200)
commit4915e4fa35262b82bec55189d96d016788995e20
treebacfaf2b4f06c3e77ae83dd1ab9259042d398aa4
parent659dce0635b17fa1a9b9f126abc509321a8b643c
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

(cherry picked from commit f2eb09b089bcdf546ed3fd4c2c59d9df02c585d8)
sys/kern/kern_resource.c