]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Mark the nfgenerated variable with NOWARN_UNUSED
authorThomas Huth <huth@tuxfamily.org>
Sat, 22 Aug 2020 08:11:18 +0000 (10:11 +0200)
committerThomas Huth <huth@tuxfamily.org>
Sat, 22 Aug 2020 08:11:18 +0000 (10:11 +0200)
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

index 4b031af6178201cd246015ca21bd79cbd1083e21..2a9196aacd3b3d022b133e71f36b58cabf4aebc8 100644 (file)
@@ -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);