public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: xfs@oss.sgi.com
Subject: [PATCH] xfsprogs: fix gcc 4.6 variable set but not used warnings
Date: Thu, 30 Jun 2011 16:25:05 -0400	[thread overview]
Message-ID: <20110630202505.GA23276@infradead.org> (raw)

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfsprogs-dev/db/bmroot.c
===================================================================
--- xfsprogs-dev.orig/db/bmroot.c	2011-06-30 22:16:37.986169145 +0200
+++ xfsprogs-dev/db/bmroot.c	2011-06-30 22:16:53.036168961 +0200
@@ -192,11 +192,9 @@ bmrootd_key_offset(
 {
 	xfs_bmdr_block_t	*block;
 	xfs_bmdr_key_t		*kp;
-	xfs_dinode_t		*dip;
 
 	ASSERT(bitoffs(startoff) == 0);
 	ASSERT(obj == iocur_top->data);
-	dip = obj;
 	block = (xfs_bmdr_block_t *)((char *)obj + byteize(startoff));
 	ASSERT(be16_to_cpu(block->bb_level) > 0);
 	kp = XFS_BMDR_KEY_ADDR(block, idx);
Index: xfsprogs-dev/growfs/xfs_growfs.c
===================================================================
--- xfsprogs-dev.orig/growfs/xfs_growfs.c	2011-06-30 22:15:46.909503114 +0200
+++ xfsprogs-dev/growfs/xfs_growfs.c	2011-06-30 22:16:15.546169457 +0200
@@ -304,7 +304,6 @@ main(int argc, char **argv)
 	error = 0;
 	if (dflag | aflag) {
 		xfs_growfs_data_t	in;
-		__uint64_t		new_agcount;
 
 		if (!mflag)
 			maxpct = geo.imaxpct;
@@ -318,9 +317,6 @@ main(int argc, char **argv)
 			error = 1;
 		}
 
-		new_agcount = dsize / geo.agblocks
-			   + (dsize % geo.agblocks != 0);
-
 		if (!error && dsize < geo.datablocks) {
 			fprintf(stderr, _("data size %lld too small,"
 				" old size is %lld\n"),
Index: xfsprogs-dev/repair/phase6.c
===================================================================
--- xfsprogs-dev.orig/repair/phase6.c	2011-06-30 22:16:58.736168887 +0200
+++ xfsprogs-dev/repair/phase6.c	2011-06-30 22:17:12.169502056 +0200
@@ -3217,7 +3217,6 @@ process_dir_inode(
 	xfs_fsblock_t		first;
 	xfs_inode_t		*ip;
 	xfs_trans_t		*tp;
-	xfs_dahash_t		hashval;
 	dir_hash_tab_t		*hashtab;
 	int			need_dot, committed;
 	int			dirty, num_illegal, error, nres;
@@ -3344,8 +3343,6 @@ process_dir_inode(
 	}
 	dir_hash_done(hashtab);
 
-	hashval = 0;
-
 	/*
 	 * We don't support repairing of v1 dir anymore, report errors and exit
 	 */
Index: xfsprogs-dev/rtcp/xfs_rtcp.c
===================================================================
--- xfsprogs-dev.orig/rtcp/xfs_rtcp.c	2011-06-30 22:15:12.339503542 +0200
+++ xfsprogs-dev/rtcp/xfs_rtcp.c	2011-06-30 22:15:31.239503313 +0200
@@ -36,7 +36,6 @@ main(int argc, char **argv)
 {
 	register int	c, i, r, errflg = 0;
 	struct stat64	s2;
-	int		eflag;
 	int		extsize = - 1;
 
 	progname = basename(argv[0]);
@@ -47,7 +46,6 @@ main(int argc, char **argv)
 	while ((c = getopt(argc, argv, "pe:V")) != EOF) {
 		switch (c) {
 		case 'e':
-			eflag = 1;
 			extsize = atoi(optarg);
 			break;
 		case 'p':
Index: xfsprogs-dev/db/attrset.c
===================================================================
--- xfsprogs-dev.orig/db/attrset.c	2011-06-30 22:17:29.352835173 +0200
+++ xfsprogs-dev/db/attrset.c	2011-06-30 22:17:54.212834865 +0200
@@ -80,7 +80,7 @@ attr_set_f(
 {
 	xfs_inode_t	*ip = NULL;
 	char		*name, *value, *sp;
-	int		c, namelen, valuelen = 0, flags = 0;
+	int		c, valuelen = 0, flags = 0;
 
 	if (cur_typ == NULL) {
 		dbprintf(_("no current type\n"));
@@ -139,7 +139,6 @@ attr_set_f(
 	}
 
 	name = argv[optind];
-	namelen = strlen(name);
 
 	if (valuelen) {
 		value = (char *)memalign(getpagesize(), valuelen);
@@ -184,7 +183,7 @@ attr_remove_f(
 {
 	xfs_inode_t	*ip = NULL;
 	char		*name;
-	int		c, namelen, flags = 0;
+	int		c, flags = 0;
 
 	if (cur_typ == NULL) {
 		dbprintf(_("no current type\n"));
@@ -226,7 +225,6 @@ attr_remove_f(
 	}
 
 	name = argv[optind];
-	namelen = strlen(name);
 
 	if (libxfs_iget(mp, NULL, iocur_top->ino, 0, &ip, 0)) {
 		dbprintf(_("failed to iget inode %llu\n"),

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2011-06-30 20:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 20:25 Christoph Hellwig [this message]
2011-07-15 21:39 ` [PATCH] xfsprogs: fix gcc 4.6 variable set but not used warnings Alex Elder

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=20110630202505.GA23276@infradead.org \
    --to=hch@infradead.org \
    --cc=xfs@oss.sgi.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