Skip to content

Commit

Permalink
ocfs2: use __attribute__ format
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Mark Fasheh committed Mar 24, 2006
1 parent b2fd16b commit a74e1f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fs/ocfs2/super.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit a74e1f0

Please sign in to comment.