Commit a74e1f0e authored by Mark Fasheh's avatar Mark Fasheh

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: default avatarMark Fasheh <mark.fasheh@oracle.com>
parent b2fd16b4
...@@ -33,12 +33,16 @@ int ocfs2_publish_get_mount_state(struct ocfs2_super *osb, ...@@ -33,12 +33,16 @@ int ocfs2_publish_get_mount_state(struct ocfs2_super *osb,
void __ocfs2_error(struct super_block *sb, void __ocfs2_error(struct super_block *sb,
const char *function, 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) #define ocfs2_error(sb, fmt, args...) __ocfs2_error(sb, __PRETTY_FUNCTION__, fmt, ##args)
void __ocfs2_abort(struct super_block *sb, void __ocfs2_abort(struct super_block *sb,
const char *function, 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) #define ocfs2_abort(sb, fmt, args...) __ocfs2_abort(sb, __PRETTY_FUNCTION__, fmt, ##args)
#endif /* OCFS2_SUPER_H */ #endif /* OCFS2_SUPER_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment