ChangeLog, e2image.c, mke2fs.c, mklost+found.c, tune2fs.c, util.c, uuidgen.c:
  e2image.c, mke2fs.c, mklost+found.c, tune2fs.c, util.c, uuidgen.c: Fix
  	gcc -Wall complaints, including one bug in tune2fs caused by a block
  	automatic shadowing version of the variable we really wanted to use,
  	which broke the logic testing to see if the filesystem was mounted.
ChangeLog, MCONFIG.in:
  (gcc-wall-new): Added new target which forgoes the make clean so we
  	only check the newly modified .c files.

diff --git a/ChangeLog b/ChangeLog
index 00a5059..81051f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
 	* MCONFIG.in: Change --enable-gcc-wall handling so that it's no
 		longer a configure option, but something which is done
 		when the developer uses the command "make gcc-wall".
+		(gcc-wall-new): Added new target which forgoes the make
+		clean so we only check the newly modified .c files.
 
 	* configure.in: Remove test for ino_t, since we don't use it any
 		more (we always use our own ext2_ino_t).  Remove
diff --git a/MCONFIG.in b/MCONFIG.in
index 0e3d494..e4ad578 100644
--- a/MCONFIG.in
+++ b/MCONFIG.in
@@ -115,9 +115,12 @@
 			-Wstrict-prototypes -Wmissing-prototypes \
 			-Wnested-externs -Winline -DNO_INLINE_FUNCS -Wshadow 
 
+gcc-wall-new:
+	(make USE_WFLAGS="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup 
+
 gcc-wall:
 	make clean > /dev/null
-	(make USE_WFLAGS="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup 
+	make gcc-wall-new
 
 #
 # Installation user and groups
diff --git a/misc/ChangeLog b/misc/ChangeLog
index e993326..8047211 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -1,5 +1,11 @@
 2001-01-11    <tytso@snap.thunk.org>
 
+	* e2image.c, mke2fs.c, mklost+found.c, tune2fs.c, util.c,
+		uuidgen.c: Fix gcc -Wall complaints, including one bug in
+		tune2fs caused by a block automatic shadowing version of
+		the variable we really wanted to use, which broke the
+		logic testing to see if the filesystem was mounted.
+
 	* badblocks.c (flush_bufs): Use ext2fs_sync_device() to sync and
 		flush the device.
 
diff --git a/misc/e2image.c b/misc/e2image.c
index 24dcdd7..f7c42d0 100644
--- a/misc/e2image.c
+++ b/misc/e2image.c
@@ -49,8 +49,6 @@
 	exit (1);
 }
 
-static const char *please_fsck = N_("Please run e2fsck on the filesystem.\n");
-
 static void write_header(int fd, struct ext2_image_hdr *hdr)
 {
 	char header_buf[4096];
@@ -81,13 +79,11 @@
 int main (int argc, char ** argv)
 {
 	int c;
-	char * tmp;
 	errcode_t retval;
 	ext2_filsys fs;
 	int open_flag = 0;
 	int raw_flag = 0;
 	int fd = 0;
-	char *features_cmd = 0;
 	struct ext2_image_hdr hdr;
 
 #ifdef ENABLE_NLS
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 1ba3aaf..b611065 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -513,9 +513,9 @@
 	       100.0 * s->s_r_blocks_count / s->s_blocks_count);
 	printf(_("First data block=%u\n"), s->s_first_data_block);
 	if (fs->group_desc_count > 1)
-		printf(_("%lu block groups\n"), fs->group_desc_count);
+		printf(_("%u block groups\n"), fs->group_desc_count);
 	else
-		printf(_("%lu block group\n"), fs->group_desc_count);
+		printf(_("%u block group\n"), fs->group_desc_count);
 	printf(_("%u blocks per group, %u fragments per group\n"),
 	       s->s_blocks_per_group, s->s_frags_per_group);
 	printf(_("%u inodes per group\n"), s->s_inodes_per_group);
diff --git a/misc/mklost+found.c b/misc/mklost+found.c
index a4d0f7d..37b7a7b 100644
--- a/misc/mklost+found.c
+++ b/misc/mklost+found.c
@@ -18,6 +18,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdlib.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index cf2163a..a28b3e4 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -55,7 +55,8 @@
 
 const char * program_name = "tune2fs";
 char * device_name;
-char * new_label, *new_last_mounted, *new_UUID, *journal_opts;
+char * new_label, *new_last_mounted, *new_UUID;
+const char *journal_opts;
 static int c_flag, C_flag, e_flag, g_flag, i_flag, l_flag, L_flag;
 static int m_flag, M_flag, r_flag, s_flag = -1, u_flag, U_flag;
 static int print_label;
@@ -93,7 +94,7 @@
 /*
  * Update the feature set as provided by the user.
  */
-static void update_feature_set(ext2_filsys fs, char *features_cmd)
+static void update_feature_set(ext2_filsys fs, char *features)
 {
 	int sparse, old_sparse, filetype, old_filetype;
 	int journal, old_journal;
@@ -107,10 +108,10 @@
 		EXT2_FEATURE_INCOMPAT_FILETYPE;
 	old_journal = sb->s_feature_compat &
 		EXT3_FEATURE_COMPAT_HAS_JOURNAL;
-	if (e2p_edit_feature(features_cmd, &sb->s_feature_compat,
+	if (e2p_edit_feature(features, &sb->s_feature_compat,
 			     ok_features)) {
 		fprintf(stderr, _("Invalid filesystem option set: %s\n"),
-			features_cmd);
+			features);
 		exit(1);
 	}
 	sparse = sb->s_feature_ro_compat &
@@ -215,9 +216,6 @@
 		}
 		printf(_("done\n"));
 	} else if (journal_size) {
-		errcode_t	retval;
-		int		mount_flags;
-
 		printf(_("Creating journal inode: "));
 		fflush(stdout);
 		retval = ext2fs_add_journal_inode(fs, journal_blocks,
@@ -241,7 +239,7 @@
 /*
  * Given argv[0], return the program name.
  */
-char *get_progname(char *argv_zero)
+static char *get_progname(char *argv_zero)
 {
 	char	*cp;
 
@@ -253,7 +251,7 @@
 }
 
 
-void parse_e2label_options(int argc, char ** argv)
+static void parse_e2label_options(int argc, char ** argv)
 {
 	if ((argc < 2) || (argc > 3)) {
 		fprintf(stderr, _("Usage: e2label device [newlabel]\n"));
@@ -269,7 +267,7 @@
 }
 
 
-void parse_tune2fs_options(int argc, char **argv)
+static void parse_tune2fs_options(int argc, char **argv)
 {
 	int c;
 	char * tmp;
@@ -487,7 +485,8 @@
 	sb = fs->super;
 	if (print_label) {
 		/* For e2label emulation */
-		printf("%.*s\n", sizeof(sb->s_volume_name), sb->s_volume_name);
+		printf("%.*s\n", (int) sizeof(sb->s_volume_name),
+		       sb->s_volume_name);
 		exit(0);
 	}
 	retval = ext2fs_check_if_mounted(device_name, &mount_flags);
@@ -495,7 +494,7 @@
 		com_err("ext2fs_check_if_mount", retval,
 			_("while determining whether %s is mounted."),
 			device_name);
-		return;
+		exit(0);
 	}
 	/* Normally we only need to write out the superblock */
 	fs->flags |= EXT2_FLAG_SUPER_ONLY;
diff --git a/misc/util.c b/misc/util.c
index e4e147e..bf3aabd 100644
--- a/misc/util.c
+++ b/misc/util.c
@@ -45,7 +45,7 @@
 void proceed_question(void)
 {
 	char buf[256];
-	char *short_yes = _("yY");
+	const char *short_yes = _("yY");
 
 	fflush(stdout);
 	fflush(stderr);
diff --git a/misc/uuidgen.c b/misc/uuidgen.c
index b6f3837..6e3fb31 100644
--- a/misc/uuidgen.c
+++ b/misc/uuidgen.c
@@ -10,6 +10,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>
 #else
@@ -22,7 +23,7 @@
 #define DO_TYPE_TIME	1
 #define DO_TYPE_RANDOM	2
 
-void usage(const char *progname)
+static void usage(const char *progname)
 {
 	fprintf(stderr, _("Usage: %s [-r] [-t]\n"), progname);
 	exit(1);