From c95125ecf18945851ad6aaa4daafcb64a3e56b0f Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Thu, 17 Sep 2026 05:05:11 +0100 Subject: [PATCH] Fix unused warning for address-taken functions --- amd64.c | 5 ++++- i386.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/amd64.c b/amd64.c index b359810..07b99d4 100644 --- a/amd64.c +++ b/amd64.c @@ -20469,9 +20469,12 @@ static void emit_load_assignment_rhs_to_reg (const char *reg) { if (find_global_symbol (name) >= 0) { - emit_load_address_to_reg_now (reg, name); + int global_index = find_global_symbol (name); + global_symbols[global_index].used = 1; + emit_load_address_to_reg_now (reg, name); free (name); + return; } diff --git a/i386.c b/i386.c index 39b62fc..cdcb61f 100644 --- a/i386.c +++ b/i386.c @@ -19127,9 +19127,12 @@ static void emit_load_assignment_rhs_to_reg (const char *reg) { if (find_global_symbol (name) >= 0) { - emit_load_address_to_reg_now (reg, name); + int global_index = find_global_symbol (name); + global_symbols[global_index].used = 1; + emit_load_address_to_reg_now (reg, name); free (name); + return; } -- 2.34.1