aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2006-03-03 13:18:58 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2006-03-24 17:58:24 -0500
commita74e1f0e8a7858c9ba6065480c88d7feba3520ac (patch)
tree651b85805a0b55b50bf41f8e48f569b658f67a5f /fs
parentb2fd16b4ff2508ac16ae994f4bcd941f97754c00 (diff)
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 <mark.fasheh@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/super.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ocfs2/super.h b/fs/ocfs2/super.h
index c564177dfbdc..783f5270f2a1 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,
33 33
34void __ocfs2_error(struct super_block *sb, 34void __ocfs2_error(struct super_block *sb,
35 const char *function, 35 const char *function,
36 const char *fmt, ...); 36 const char *fmt, ...)
37 __attribute__ ((format (printf, 3, 4)));
38
37#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args) 39#define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)
38 40
39void __ocfs2_abort(struct super_block *sb, 41void __ocfs2_abort(struct super_block *sb,
40 const char *function, 42 const char *function,
41 const char *fmt, ...); 43 const char *fmt, ...)
44 __attribute__ ((format (printf, 3, 4)));
45
42#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args) 46#define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
43 47
44#endif /* OCFS2_SUPER_H */ 48#endif /* OCFS2_SUPER_H */