]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: fix gcc 4.6 variable set but not used warnings
authorChristoph Hellwig <hch@lst.de>
Sat, 16 Jul 2011 17:40:19 +0000 (10:40 -0700)
committerChristoph Hellwig <hch@lst.de>
Sat, 16 Jul 2011 17:40:19 +0000 (10:40 -0700)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
db/attrset.c
db/bmroot.c
growfs/xfs_growfs.c
io/fiemap.c
repair/phase6.c
rtcp/xfs_rtcp.c

index 35fea111ce9ec3dd4a9b9b9f8eaedffa7a2a1211..21980ef061414a8511ddee4fc964999cf72c5db2 100644 (file)
@@ -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);
@@ -183,7 +182,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"));
@@ -225,7 +224,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"),
index 3649873639726a8bba6f3e030f775e86ba889a0d..3e18917a66f660dfa6a63b8df0d1193b9aaa019f 100644 (file)
@@ -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 4a86b9dac1a3b2a9884bb1a88fa3e44cca9a3b10..98ce5df6d2f41bdc4c5e91b28f3867d8215e8b8f 100644 (file)
@@ -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 fa990cc4d89e1b4172e1c9aa364d6525dfb31999..066e693f14f92106c9bba5e3d6aece308107f6af 100644 (file)
@@ -163,7 +163,6 @@ fiemap_f(
        int             max_extents = 0;
        int             num_extents = 32;
        int             last = 0;
-       int             nflag = 0;
        int             lflag = 0;
        int             vflag = 0;
        int             fiemap_flags = FIEMAP_FLAG_SYNC;
@@ -190,7 +189,6 @@ fiemap_f(
                        break;
                case 'n':
                        max_extents = atoi(optarg);
-                       nflag = 1;
                        break;
                case 'v':
                        vflag++;
index d0560631f9f02b98a651dc1248c71d815d06dfd4..7ef6278a284b366bd58c49c73e290b1feaa4fb07 100644 (file)
@@ -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 d91da3194ad6612e9f7a56955697e1185e215332..6ea7ab930878db7bbe5c372f0a6a47fb35beeae9 100644 (file)
@@ -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':