Skip to content

Commit 66ed28e

Browse files
committed
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
1 parent f9d4982 commit 66ed28e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

arch/m68k/sun3/prom/printf.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ prom_printf(char *fmt, ...)
2525
{
2626
va_list args;
2727
char ch, *bptr;
28-
int i;
2928

3029
va_start(args, fmt);
3130

3231
#ifdef CONFIG_KGDB
3332
ppbuf[0] = 'O';
34-
i = vsprintf(ppbuf + 1, fmt, args) + 1;
33+
vsprintf(ppbuf + 1, fmt, args) + 1;
3534
#else
36-
i = vsprintf(ppbuf, fmt, args);
35+
vsprintf(ppbuf, fmt, args);
3736
#endif
3837

3938
bptr = ppbuf;

0 commit comments

Comments
 (0)