From 88a781dd24dc059764361fe2c7ff2a1133fc9701 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Sat, 22 Aug 2020 10:11:18 +0200 Subject: [PATCH] Mark the nfgenerated variable with NOWARN_UNUSED The variable is only used if NOFLAGS_SUPPORT_GENCPU is not set, so GCC emits a compiler warning about a set-but-unused variable here. Let's use the NOWARN_UNUSED() macro to suppress the unnecessary warning in this case. --- gencpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gencpu.cpp b/gencpu.cpp index 4b031af6..2a9196aa 100644 --- a/gencpu.cpp +++ b/gencpu.cpp @@ -9450,7 +9450,7 @@ static void generate_one_opcode (int rp, const char *extra) printf("%s", outbuffer); // generate noflags variant if needed - int nfgenerated = 0; + NOWARN_UNUSED(int nfgenerated = 0); if (using_noflags && table68k[opcode].flagdead != 0 && !disable_noflags) { convert_to_noflags(outbuffer); printf("%s", outbuffer); -- 2.47.3