Whamcloud - gitweb
Fix gcc -Wall warnings in resize2fs
authorTheodore Ts'o <tytso@mit.edu>
Sat, 7 Jun 2008 15:52:33 +0000 (11:52 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 7 Jun 2008 15:52:33 +0000 (11:52 -0400)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize/main.c
resize/resize2fs.c
resize/test_extent.c

index 8b90e96..e26cd8b 100644 (file)
@@ -324,7 +324,7 @@ int main (int argc, char ** argv)
        }
        
        if (print_min_size) {
-               printf("Estimated minimum size of the filesystem: %lu\n",
+               printf("Estimated minimum size of the filesystem: %u\n",
                       calculate_minimum_resize_size(fs));
                exit(0);
        }
index 5fb3501..2d53873 100644 (file)
@@ -1637,9 +1637,9 @@ static errcode_t ext2fs_calculate_summary_stats(ext2_filsys fs)
  */
 blk_t calculate_minimum_resize_size(ext2_filsys fs)
 {
-       blk_t inode_count, blks_needed, groups, blk, data_blocks;
+       blk_t inode_count, blks_needed, groups, data_blocks;
        blk_t grp, data_needed, last_start;
-       int overhead = 0, old_group = -1, num_of_superblocks = 0;
+       int overhead = 0, num_of_superblocks = 0;
 
        /*
         * first figure out how many group descriptors we need to
index c52d556..6a3f49d 100644 (file)
@@ -110,7 +110,13 @@ void do_test(FILE *in, FILE *out)
        }
 }
 
-int main(int argc, char **argv)
+#ifdef __GNUC__
+#define ATTR(x) __attribute__(x)
+#else
+#define ATTR(x)
+#endif
+
+int main(int argc ATTR((unused)), char **argv ATTR((unused)))
 {
        do_test(stdin, stdout);
        exit(0);