Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

m68k: sun3: Remove unused vsprintf() return value in prom_printf()

When building with W=1:

arch/m68k/sun3/prom/printf.c: In function ‘prom_printf’:
arch/m68k/sun3/prom/printf.c:28:13: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
28 | int i;
| ^

As the return value of vsprintf() 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/94a1e61b1651ff05f4a59655d9b8c1ac5338f60c.1694613528.git.geert@linux-m68k.org

+2 -3
+2 -3
arch/m68k/sun3/prom/printf.c
··· 25 25 { 26 26 va_list args; 27 27 char ch, *bptr; 28 - int i; 29 28 30 29 va_start(args, fmt); 31 30 32 31 #ifdef CONFIG_KGDB 33 32 ppbuf[0] = 'O'; 34 - i = vsprintf(ppbuf + 1, fmt, args) + 1; 33 + vsprintf(ppbuf + 1, fmt, args) + 1; 35 34 #else 36 - i = vsprintf(ppbuf, fmt, args); 35 + vsprintf(ppbuf, fmt, args); 37 36 #endif 38 37 39 38 bptr = ppbuf;