| Submitter | Andrew Morton |
|---|---|
| Date | Sept. 28, 2011, 10:03 p.m. |
| Message ID | <20110928150325.52c12c1e.akpm00@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/116859/ |
| State | Not Applicable |
| Headers | show |
Comments
Patch
diff -puN arch/alpha/boot/misc.c~treewide-use-__printf-not-__attribute__formatprintf-fix arch/alpha/boot/misc.c diff -puN arch/alpha/include/asm/console.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/alpha/include/asm/console.h diff -puN arch/frv/include/asm/system.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/frv/include/asm/system.h diff -puN arch/ia64/include/asm/mca.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/ia64/include/asm/mca.h diff -puN arch/m68k/include/asm/natfeat.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/m68k/include/asm/natfeat.h diff -puN arch/mn10300/include/asm/gdb-stub.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/mn10300/include/asm/gdb-stub.h diff -puN arch/powerpc/boot/ps3.c~treewide-use-__printf-not-__attribute__formatprintf-fix arch/powerpc/boot/ps3.c --- a/arch/powerpc/boot/ps3.c~treewide-use-__printf-not-__attribute__formatprintf-fix +++ a/arch/powerpc/boot/ps3.c @@ -36,7 +36,8 @@ extern int lv1_get_repository_node_value #ifdef DEBUG #define DBG(fmt...) printf(fmt) #else -static inline __printf(1, 2) int DBG(const char *fmt, ...) {return 0;} +static inline int __attribute__ ((format (printf, 1, 2))) DBG( + const char *fmt, ...) {return 0;} #endif BSS_STACK(4096); diff -puN arch/powerpc/boot/stdio.h~treewide-use-__printf-not-__attribute__formatprintf-fix arch/powerpc/boot/stdio.h --- a/arch/powerpc/boot/stdio.h~treewide-use-__printf-not-__attribute__formatprintf-fix +++ a/arch/powerpc/boot/stdio.h @@ -7,11 +7,12 @@ #define EINVAL 22 /* Invalid argument */ #define ENOSPC 28 /* No space left on device */ -extern __printf(1, 2) int printf(const char *fmt, ...); +extern int printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); #define fprintf(fmt, args...) printf(args) -extern __printf(2, 3) int sprintf(char *buf, const char *fmt, ...); +extern int sprintf(char *buf, const char *fmt, ...) + __attribute__((format(printf, 2, 3))); extern int vsprintf(char *buf, const char *fmt, va_list args);