Commit 3ea664c7c339a788341b47f1eb0aa98eee18a721

Authored by Jeroen Hofstee
Committed by Tom Rini
1 parent 6b13f0c050

env_callback.h: spl: mark callback as maybe_unused

When static inline is used in a header file the function
should preferably be inlined and if not possible made a
static function. When declared inside a c file there is a
static function, which might be inlined. Since SPL uses a
define to declare the static inline it becomes part of the
c file although it is declared in a header and clang will
warn that you have introduced unused static functions. Add
maybe_unused to prevent such warnings.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

include/env_callback.h
... ... @@ -60,7 +60,7 @@
60 60 */
61 61 #ifdef CONFIG_SPL_BUILD
62 62 #define U_BOOT_ENV_CALLBACK(name, callback) \
63   - static inline void _u_boot_env_noop_##name(void) \
  63 + static inline __maybe_unused void _u_boot_env_noop_##name(void) \
64 64 { \
65 65 (void)callback; \
66 66 }