HomeFreeBSD

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

Description

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

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

sys/kern/kern_dtrace.c:64:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
kdtrace_proc_size()
                 ^
                  void
sys/kern/kern_dtrace.c:87:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
kdtrace_thread_size()
                   ^
                    void

This is because kdtrace_proc_size() and kdtrace_thread_size() 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 db8ea61ae261cc060f423dea050bf943bcad6793)

Details

Provenance
dimAuthored on Jul 26 2022, 2:11 PM
Parents
rG29534af72577: Adjust ng_{name,ID}_rehash() definitions to avoid clang 15 warnings
Branches
Unknown
Tags
Unknown