m68k: emu: Remove unused vsnprintf() return value in nfprint()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 13 Sep 2023 14:08:04 +0000 (16:08 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 6 Oct 2023 08:03:02 +0000 (10:03 +0200)
When building with W=1:

    arch/m68k/emu/natfeat.c: In function ‘nfprint’:
    arch/m68k/emu/natfeat.c:59:13: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
       59 |         int n;
  |             ^

As the return value of vsnprintf() is unused, and serves no practical
purpose here, fix this by removing the variable.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/a8b6b17ff352cc560d1848a92d171bb0f44ccb27.1694613528.git.geert@linux-m68k.org
arch/m68k/emu/natfeat.c

index d124c62022c2d10505c1cb7f79e1a38b703622dd..777c7b42a50f37bfa9e2e0c726c6688020a0b82d 100644 (file)
@@ -56,10 +56,9 @@ void nfprint(const char *fmt, ...)
 {
        static char buf[256];
        va_list ap;
-       int n;
 
        va_start(ap, fmt);
-       n = vsnprintf(buf, 256, fmt, ap);
+       vsnprintf(buf, 256, fmt, ap);
        nf_call(nf_get_id("NF_STDERR"), virt_to_phys(buf));
        va_end(ap);
 }