https://sourceware.org/bugzilla/show_bug.cgi?id=34670
Bug ID: 34670
Summary: [build] clang-23 errors on set-but-no-used variables
Product: binutils
Version: 2.47
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: guillaume-gnu at outters dot eu
Target Milestone: ---
Building ld fails with clang 23 (and the default -Werror=all), which now
detects global variables that are not read after being set:
error: variable 'map_option_f' set but not used
[-Werror,-Wunused-but-set-global]
Two occurrences:
- ld/ldlang.c: static map_option_f has a setter (lang_add_map()), but nowhere
to get read back.
- ld/mri.c: symbol_truncate is initialized, and can get modified (through
mri_truncate()), but is not used either
Of course adding the -Wno-error=unused-but-set-global flag make both pass,
but there's probably an intended (future?) use that, once implemented, will
make those errors cleanly go away.
--
You are receiving this mail because:
You are on the CC list for the bug.