diff options
| author | Nathan Chancellor <nathan@kernel.org> | 2026-08-31 18:46:31 -0700 |
|---|---|---|
| committer | Nicolas Schier <nsc@kernel.org> | 2026-09-12 20:01:18 +0200 |
| commit | 4f73462856576797b8f3c55564a9be99f76dc67b (patch) | |
| tree | 80c7ed0413854f2f54c1be274c2d19a59be96cce /scripts/basic | |
| parent | 06bb43d8c79762fa3452f292cd080e54bef5d431 (diff) | |
| download | linux-4f73462856576797b8f3c55564a9be99f76dc67b.tar.gz linux-4f73462856576797b8f3c55564a9be99f76dc67b.zip | |
scripts/sorttable: Mark long_size as __maybe_unused
When building in a kernel tree prior to commit b055f4c431e3 ("sorttable:
Move ELF parsing into scripts/elf-parse.[ch]") with clang-23 or newer,
which implements a new warning under -Wunused-but-set-variable for
static global variable, there is a warning from sorttable because
long_size is unused when MCOUNT_SORT_ENABLED is not set:
scripts/sorttable.c:452:12: error: variable 'long_size' set but not used [-Werror,-Wunused-but-set-global]
452 | static int long_size;
| ^
Mark long_size as __maybe_unused to avoid inserting more ugly #ifdef
directives while insuring the warning does not reappear, as the
aforementioned change does not alter the uses of long_size, so it
appears to be coincidence that the warning disappears after this
refactoring.
Cc: stable@vger.kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <n.schier@fritz.com>
Link: https://patch.msgid.link/20260831-sorttable-long_size-unused-but-set-global-v1-1-8a96b88697e5@kernel.org
Signed-off-by: Nicolas Schier <nsc@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
