Skip to content

Commit dc40c42

Browse files
committed
m68k: sun3: Annotate prom_printf() with __printf()
When building with W=1: arch/m68k/sun3/prom/printf.c: In function ‘prom_printf’: arch/m68k/sun3/prom/printf.c:35:9: warning: function ‘prom_printf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 35 | vsprintf(ppbuf, fmt, args); | ^~~~~~~~ Fix this by annotating prom_printf() with __printf(1, 2). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/61017c012617e6f633ac9f9a3c2659ae38e1f2fb.1694613528.git.geert@linux-m68k.org
1 parent 66ed28e commit dc40c42

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arch/m68k/include/asm/oplib.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef __SPARC_OPLIB_H
1010
#define __SPARC_OPLIB_H
1111

12+
#include <linux/compiler.h>
13+
1214
#include <asm/openprom.h>
1315

1416
/* The master romvec pointer... */
@@ -149,7 +151,7 @@ extern char prom_getchar(void);
149151
extern void prom_putchar(char character);
150152

151153
/* Prom's internal printf routine, don't use in kernel/boot code. */
152-
void prom_printf(char *fmt, ...);
154+
__printf(1, 2) void prom_printf(char *fmt, ...);
153155

154156
/* Query for input device type */
155157

0 commit comments

Comments
 (0)