aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/rustdoc_test_gen.rs
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2025-04-04 22:10:03 +0000
committerPetr Mladek <[email protected]>2025-04-10 14:08:37 +0000
commitb5960a06b90eeba147c50c2d14de57b923371651 (patch)
tree5f7a01380e9ed247bbb8a9cab49dd41f8906270e /scripts/rustdoc_test_gen.rs
parentcompiler-gcc.h: Introduce __diag_GCC_all (diff)
downloadkernel-b5960a06b90eeba147c50c2d14de57b923371651.tar.gz
kernel-b5960a06b90eeba147c50c2d14de57b923371651.zip
vsprintf: Use __diag macros to disable '-Wsuggest-attribute=format'
The GCC specific warning '-Wsuggest-attribute=format' is disabled around va_format() using raw #pragma statements, which includes an '#ifndef __clang__' to avoid a warning about an unknown warning option from clang (which recognizes '#pragma GCC' for compatibility reasons): lib/vsprintf.c:1703:32: error: unknown warning group '-Wsuggest-attribute=format', ignored [-Werror,-Wunknown-warning-option] 1703 | #pragma GCC diagnostic ignored "-Wsuggest-attribute=format" | ^ While the current solution works, it is not visually appealing. The kernel already has some infrastructure that wraps these #pragma statements to give more specific control over diagnostics without needing #ifdef blocks for different compilers. Convert the existing statements over to the __diag macros. Closes: https://lore.kernel.org/r/CAHk-=wgfX9nBGE0Ap9GjhOy7Mn=RSy=rx0MvqfYFFDx31KJXqQ@mail.gmail.com Signed-off-by: Nathan Chancellor <[email protected]> Tested-by: Andy Shevchenko <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Link: https://patch.msgid.link/20250404-vsprintf-convert-pragmas-to-__diag-v1-2-5d6c5c55b2bd@kernel.org Signed-off-by: Petr Mladek <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_gen.rs')
0 files changed, 0 insertions, 0 deletions