public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add gcc printf format checks
@ 2008-01-06 13:51 Helge Deller
  2008-01-06 16:05 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Helge Deller @ 2008-01-06 13:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton

[PATCH] add gcc printf format checks

trivial patch which adds some missing printf format checking to 
compat.h and msdos_fs.h
Build-tested and no regressions found.

Signed-off-by: Helge Deller <deller@gmx.de>


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);
 extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat);
 
 asmlinkage long compat_sys_migrate_pages(compat_pid_t pid,

diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index f950921..651c265 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -419,7 +419,7 @@ extern int fat_fill_super(struct super_block *sb, void *data, int silent,
 extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
 		            struct inode *i2);
 /* fat/misc.c */
-extern void fat_fs_panic(struct super_block *s, const char *fmt, ...);
+extern void fat_fs_panic(struct super_block *s, const char *fmt, ...) __printf(2,3);
 extern void fat_clusters_flush(struct super_block *sb);
 extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster);
 extern int date_dos2unix(unsigned short time, unsigned short date);


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-07 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-06 13:51 [PATCH] add gcc printf format checks Helge Deller
2008-01-06 16:05 ` Joe Perches
     [not found]   ` <200801061858.50975.deller@gmx.de>
2008-01-07 19:14     ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox