This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
gfs2-utils: master - libgfs2: format checking for printf-likefunctions
- From: Steven Whitehouse <swhiteho at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Mon, 26 Jan 2009 10:10:46 +0000 (UTC)
- Subject: gfs2-utils: master - libgfs2: format checking for printf-likefunctions
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=3907c0480ca09e8917d222323da5d66e3f5313a7
Commit: 3907c0480ca09e8917d222323da5d66e3f5313a7
Parent: 2c091887907bd8eea5d506dd7a998b1f6eef96d4
Author: Steven Whitehouse <swhiteho@redhat.com>
AuthorDate: Mon Jan 26 09:08:37 2009 +0000
Committer: Steven Whitehouse <swhiteho@redhat.com>
CommitterDate: Mon Jan 26 09:08:37 2009 +0000
libgfs2: format checking for printf-like functions
It appears that there are a lot of bugs in fsck's format strings.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
gfs2/libgfs2/libgfs2.h | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index c04918b..4d219f4 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -612,12 +612,14 @@ do { print_log(1, MSG_CRITICAL, format); } while(0)
extern void increase_verbosity(void);
extern void decrease_verbosity(void);
extern void print_fsck_log(int iif, int priority, char *file, int line,
- const char *format, ...);
+ const char *format, ...)
+ __attribute__((format(printf,5,6)));
extern char generic_interrupt(const char *caller, const char *where,
const char *progress, const char *question,
const char *answers);
extern int gfs2_query(int *setonabort, struct gfs2_options *opts,
- const char *format, ...);
+ const char *format, ...)
+ __attribute__((format(printf,3,4)));
/* misc.c */
#define SYS_BASE "/sys/fs/gfs2"
@@ -686,7 +688,8 @@ extern int write_sb(struct gfs2_sbd *sdp);
/* ondisk.c */
extern uint32_t gfs2_disk_hash(const char *data, int len);
-extern void print_it(const char *label, const char *fmt, const char *fmt2, ...);
+extern void print_it(const char *label, const char *fmt, const char *fmt2, ...)
+ __attribute__((format(printf,3,4)));
__END_DECLS