This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: STABLE3 - libgfs2: format checking for printf-like functions


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ee684e0bdd66cc175e7eb774912d171905b58df0
Commit:        ee684e0bdd66cc175e7eb774912d171905b58df0
Parent:        af56981cec36a6d4f813e192821979f5e7f91b68
Author:        Steven Whitehouse <swhiteho@redhat.com>
AuthorDate:    Mon Jan 26 09:08:37 2009 +0000
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu Feb 19 10:59:54 2009 +0100

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
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]