diff options
| author | Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> | 2026-04-16 18:22:44 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2026-05-06 19:51:46 +0000 |
| commit | 84a95741805d84f0074a34d61b93ccf86f422cf3 (patch) | |
| tree | e84114f23bc1f1a6cb4eadd181bf9b272e1508b8 | |
| parent | 103f9883d1ed7431c432caa6ab9c61cd4d0831d0 (diff) | |
| -rw-r--r-- | share/man/man9/cdefs.9 | 6 | ||||
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/compiler_attributes.h | 1 | ||||
| -rw-r--r-- | sys/sys/cdefs.h | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/share/man/man9/cdefs.9 b/share/man/man9/cdefs.9 index cc56e34d070a..2bda50c3f875 100644 --- a/share/man/man9/cdefs.9 +++ b/share/man/man9/cdefs.9 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd May 9, 2025 +.Dd May 6, 2026 .Dt CDEFS 9 .Os .Sh NAME @@ -85,7 +85,9 @@ linkage. .It Sy __weak_symbol Ta Declare the symbol to be a weak symbol .It Sy __dead2 Ta Function will not return .It Sy __pure2 Ta Function has no side effects -.It Sy __unused Ta To Variable may be unused (usually arguments), so do not +.It Sy __unused Ta Variable may be unused (usually arguments), so do not +warn about it +.It Sy __maybe_unused Ta Variable may be unused (usually arguments), so do not warn about it .It Sy __used Ta Function really is used, so emit it even if it appears unused. .It Sy __deprecated Ta Function interface has been deprecated, and clients diff --git a/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h b/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h index 42908bb6c2b5..159c833802c5 100644 --- a/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler_attributes.h @@ -39,7 +39,6 @@ #define noinline_for_stack __noinline -#define __maybe_unused __unused #define __always_unused __unused #define __must_check __result_use_check diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 132d4809b0ed..a08c50c8439a 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -152,6 +152,7 @@ #define __weak_symbol __attribute__((__weak__)) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) +#define __maybe_unused __attribute__((__unused__)) #define __unused __attribute__((__unused__)) #define __used __attribute__((__used__)) #define __deprecated __attribute__((__deprecated__)) |
