From: Mark Fasheh Date: Fri, 3 Mar 2006 18:18:58 +0000 (-0800) Subject: ocfs2: use __attribute__ format X-Git-Tag: v2.6.17-rc1~731^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a74e1f0e8a7858c9ba6065480c88d7feba3520ac;p=linux-2.6 ocfs2: use __attribute__ format Use the "format" attribute on ocfs2_error() and ocfs2_abort() so that the compiler will warn when we get calls to those functions wrong. Signed-off-by: Mark Fasheh --- diff --git a/fs/ocfs2/super.h b/fs/ocfs2/super.h index c564177dfb..783f5270f2 100644 --- a/fs/ocfs2/super.h +++ b/fs/ocfs2/super.h @@ -33,12 +33,16 @@ int ocfs2_publish_get_mount_state(struct ocfs2_super *osb, void __ocfs2_error(struct super_block *sb, const char *function, - const char *fmt, ...); + const char *fmt, ...) + __attribute__ ((format (printf, 3, 4))); + #define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args) void __ocfs2_abort(struct super_block *sb, const char *function, - const char *fmt, ...); + const char *fmt, ...) + __attribute__ ((format (printf, 3, 4))); + #define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args) #endif /* OCFS2_SUPER_H */