public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] add gcc printf format checks
Date: Sun, 6 Jan 2008 14:51:22 +0100	[thread overview]
Message-ID: <200801061451.22338.deller@gmx.de> (raw)

[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);


             reply	other threads:[~2008-01-06 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06 13:51 Helge Deller [this message]
2008-01-06 16:05 ` [PATCH] add gcc printf format checks Joe Perches
     [not found]   ` <200801061858.50975.deller@gmx.de>
2008-01-07 19:14     ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801061451.22338.deller@gmx.de \
    --to=deller@gmx.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox