diff options
| author | Zhang Qiyue <peter-open-source.probing805@aleeas.com> | 2026-07-12 06:26:36 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2026-07-25 16:29:28 +0000 |
| commit | 64038db825d64fb4827fc8ee264ea0fa1a046d82 (patch) | |
| tree | 1c28a6e7381f031c15b992ded717d7fc0ecbcb27 | |
| parent | 5f346dba4f7b6ca088f2a3f40c5b562ef531adda (diff) | |
libc: tests: add static to resolve -Wmissing-prototypes
The function create_staticobj() is only used inside this translation unit.
Clang produces a -Wmissing-prototypes warning during standard buildworld.
This warning will become a fatal compile error if MK_WERROR is enabled for hardened builds.
PR: 285870
Fixes: ee9ce1078 ("libc: tests: add some tests for __cxa_atexit...")
Signed-off-by: Zhang Qiyue <peter-open-source.probing805@aleeas.com>
Reviewed-by: ngie
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2321
| -rw-r--r-- | lib/libc/tests/stdlib/libatexit/libatexit.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/tests/stdlib/libatexit/libatexit.cc b/lib/libc/tests/stdlib/libatexit/libatexit.cc index bb286c97e421..7c5a7126d178 100644 --- a/lib/libc/tests/stdlib/libatexit/libatexit.cc +++ b/lib/libc/tests/stdlib/libatexit/libatexit.cc @@ -44,7 +44,7 @@ struct other_object { } }; -void +static void create_staticobj() { static other_object obj; |
