On Mon, Mar 9, 2026 at 12:11 PM Taylor Simpson <[email protected]> wrote:
> > > On Mon, Mar 9, 2026 at 8:48 AM Brian Cain <[email protected]> > wrote: > >> The analyze_read() methods on GuestSource, GuestPairSource, >> SystemSource, and SystemPairSource were no-ops because these >> source registers do not need read-tracking in the analyze phase. >> However, gen_analyze_funcs.py unconditionally declares the >> register-number variable (e.g. GsN) via decl_reg_num() for all >> registers that are read or written. When building with >> hexagon-softmmu, the generated analyze function bodies are >> compiled (outside the #ifndef CONFIG_USER_ONLY guard), and the >> declared-but-unreferenced register-number variable triggers >> -Werror=unused-variable under both gcc and clang. >> >> Emit a (void) cast on the register number from analyze_read() to >> suppress the warning. >> >> Signed-off-by: Brian Cain <[email protected]> >> --- >> target/hexagon/hex_common.py | 16 ++++++++++++---- >> 1 file changed, 12 insertions(+), 4 deletions(-) >> > > Better to declare GsN with G_GNUC_UNUSED. > This will be fixed in v5. > >
