public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: cluster: STABLE3 - libgfs2: format checking for printf-like functions
Date: Thu, 19 Feb 2009 10:09:00 -0000	[thread overview]
Message-ID: <20090219100838.1AEFF12030E@lists.fedorahosted.org> (raw)

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
 


                 reply	other threads:[~2009-02-19 10:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090219100838.1AEFF12030E@lists.fedorahosted.org \
    --to=fabbione@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).