From 2c25f7e75ad10078ecfed08b9295fb1904c8bb80 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 7 Jun 2008 11:52:33 -0400 Subject: [PATCH] Fix gcc -Wall warnings in resize2fs Signed-off-by: "Theodore Ts'o" --- resize/main.c | 2 +- resize/resize2fs.c | 4 ++-- resize/test_extent.c | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/resize/main.c b/resize/main.c index 8b90e9675..e26cd8b70 100644 --- a/resize/main.c +++ b/resize/main.c @@ -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); } diff --git a/resize/resize2fs.c b/resize/resize2fs.c index 5fb35010a..2d53873b2 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -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 diff --git a/resize/test_extent.c b/resize/test_extent.c index c52d5562d..6a3f49dd2 100644 --- a/resize/test_extent.c +++ b/resize/test_extent.c @@ -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); -- 2.47.3