From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 544 invoked by alias); 19 Feb 2009 10:09:17 -0000 Received: (qmail 531 invoked by alias); 19 Feb 2009 10:09:16 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion.fedora.phx.redhat.com Subject: cluster: STABLE3 - libgfs2: format checking for printf-like functions To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/STABLE3 X-Git-Reftype: branch X-Git-Oldrev: af56981cec36a6d4f813e192821979f5e7f91b68 X-Git-Newrev: ee684e0bdd66cc175e7eb774912d171905b58df0 From: "Fabio M. Di Nitto" Message-Id: <20090219100838.1AEFF12030E@lists.fedorahosted.org> Date: Thu, 19 Feb 2009 10:09:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q1/txt/msg00485.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ee684e0bdd66cc175e7eb774912d171905b58df0 Commit: ee684e0bdd66cc175e7eb774912d171905b58df0 Parent: af56981cec36a6d4f813e192821979f5e7f91b68 Author: Steven Whitehouse AuthorDate: Mon Jan 26 09:08:37 2009 +0000 Committer: Fabio M. Di Nitto 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 --- 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