lkml.org 
[lkml]   [2008]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] add gcc printf format checks
From
Date
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.




\
 
 \ /
  Last update: 2008-01-06 17:09    [W:0.061 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site