Fix bfd/opcodes/binutils/sim/ld warnings with clang 23
Series of patches to fix compiler warnings in binutils, particularly for clang 23.
This patch series addresses compiler warnings, primarily from clang 23, that have surfaced due to its increased strictness with unused variables. It includes fixes for various components like BFD, opcodes, sim, and ld, removing unused variables and correcting type issues. One patch also includes a fix for a glibc 2.43 change affecting strchr’s signature.
In Details
This is the cover letter for a series of patches aimed at resolving build-time warnings, specifically those introduced by newer versions of clang (e.g., clang 23) that now enforce stricter checks for unused variables and other potential issues. The series touches multiple parts of the binutils project, including the Binary File Descriptor (BFD) library, the opcodes disassembly engine, the simulator (sim), and the linker (ld).
- BFD
- Binary File Descriptor. A library within binutils that provides a common interface for reading and writing various binary object file formats.
- opcodes
- The part of binutils responsible for disassembling machine code into human-readable assembly instructions.
- sim
- Simulator. A component of binutils that simulates the execution of code for various processor architectures.
- ld
- The GNU linker, responsible for combining object files into an executable or library.
- unused-but-set-variable
- A compiler warning indicating a variable that has been assigned a value but is never subsequently read. This often suggests dead code.
- strchr
- A C standard library function that searches for the first occurrence of a character within a string.