Messages in this thread | | | Subject | Re: [PATCH] add gcc printf format checks | From | Joe Perches <> | Date | Sun, 06 Jan 2008 08:05:39 -0800 |
| |
On Sun, 2008-01-06 at 14:51 +0100, Helge Deller wrote: > [PATCH] add gcc printf format checks > diff --git a/include/linux/compat.h b/include/linux/compat.h > index 0e69d2c..ce2038f 100644 > --- a/include/linux/compat.h > +++ b/include/linux/compat.h > @@ -232,7 +232,7 @@ extern int put_compat_itimerspec(struct compat_itimerspec __user *dst, > > asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); > > -extern int compat_printk(const char *fmt, ...); > +extern int compat_printk(const char *fmt, ...) __printf(1,2);
__attribute__((format(printf, 1, 2))) seems to be the preferred form. 91 to 1.
I think __printf should be removed from gcc-compiler.h and the only use in include/linux/marker.h converted.
| |