xfsprogs: fix gcc 4.6 variable set but not used warnings
PATCH 1/1 xfsprogs: fix gcc 4.6 variable set but not used warnings
Signed-off-by Christoph Hellwig <[email protected]>
db/bmroot.c +0 -2
@@ -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);
growfs/xfs_growfs.c +0 -4
@@ -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"),
repair/phase6.c +0 -3
@@ -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 */
rtcp/xfs_rtcp.c +0 -2
@@ -36,7 +36,6 @@ main(int argc, char **argv) { registerint 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' :
db/attrset.c +2 -4
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 1 line · Christoph Hellwig
Signed-off-by Christoph Hellwig <[email protected]>
This one looks good to me too. As with the previous one I tried it out on x86_64, i386, and ia64 to get better coverage. I found a few more of this type of warning, which I'll send to you as another patch to combine with this one.
Or, if you prefer you can take my Reviewed-by on this and I'll do the other patch myself later.
-Alex
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs