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


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