[PATCH] binutils/readelf: Remove unused static variables

Jan Beulich jbeulich@suse.com
Wed Apr 1 12:37:28 GMT 2026


On 01.04.2026 13:09, Bratislav Filipovic wrote:
> Remove static variables do_ctf and do_sframe that are set but never
> read, causing build failures with LLVM's extended
> -Wunused-but-set-variable warning.
> 
> These variables are dead code:
> - Declared at lines 244-245 as static booleans
> - Set to true when --ctf or --sframe options are parsed
> - Never actually used or read anywhere in the code
> - The actual dump functionality is triggered by request_dump() calls
> 
> Build error with -Werror enabled:
> binutils/readelf.c:244:13: error: variable 'do_ctf' set but not used
>   [-Werror,-Wunused-but-set-variable]
> binutils/readelf.c:245:13: error: variable 'do_sframe' set but not used
>   [-Werror,-Wunused-but-set-variable]

Okay.

Jan


More information about the Binutils mailing list