Patchwork [3/3] misc: fix gcc -Wall nits

login
register
mail settings
Submitter Theodore Ts'o
Date May 20, 2013, 1:59 p.m.
Message ID <1369058343-1988-3-git-send-email-tytso@mit.edu>
Download mbox | patch
Permalink /patch/245047/
State Accepted
Headers show

Comments

Theodore Ts'o - May 20, 2013, 1:59 p.m.
[For 1.43 branch]

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 misc/dumpe2fs.c |  2 +-
 misc/tune2fs.c  | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

Patch

diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index e18843e..5369ffb 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -324,7 +324,7 @@  static void list_bad_blocks(ext2_filsys fs, int dump)
 	ext2fs_badblocks_list_free(bb_list);
 }
 
-static char *journal_checksum_type_str(__u8 type)
+static const char *journal_checksum_type_str(__u8 type)
 {
 	switch (type) {
 	case JBD2_CRC32C_CHKSUM:
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 4f8cedc..7d6520e 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -448,7 +448,7 @@  struct rewrite_dir_context {
 
 static int rewrite_dir_block(ext2_filsys fs,
 			     blk64_t	*blocknr,
-			     e2_blkcnt_t blockcnt,
+			     e2_blkcnt_t blockcnt EXT2FS_ATTR((unused)),
 			     blk64_t	ref_block EXT2FS_ATTR((unused)),
 			     int	ref_offset EXT2FS_ATTR((unused)),
 			     void	*priv_data)
@@ -510,7 +510,7 @@  static int rewrite_dir_block(ext2_filsys fs,
 				ctx->errcode = EXT2_ET_DIR_CORRUPTED;
 			if (ctx->errcode)
 				return BLOCK_ABORT;
-			de = (struct ext2_dir_entry *)(((void *)de) + rec_len);
+			de = (struct ext2_dir_entry *)(((char *)de) + rec_len);
 		}
 		ctx->errcode = ext2fs_get_rec_len(fs, last_de, &rec_len);
 		if (ctx->errcode)
@@ -540,7 +540,7 @@  static int rewrite_dir_block(ext2_filsys fs,
 					penultimate_de);
 			changed = 1;
 		} else {
-			int csum_size = sizeof(struct ext2_dir_entry_tail);
+			unsigned csum_size = sizeof(struct ext2_dir_entry_tail);
 			struct ext2_dir_entry_tail *t;
 
 			/*
@@ -584,8 +584,8 @@  out:
 	return 0;
 }
 
-errcode_t rewrite_directory(ext2_filsys fs, ext2_ino_t dir,
-			    struct ext2_inode *inode)
+static errcode_t rewrite_directory(ext2_filsys fs, ext2_ino_t dir,
+				   struct ext2_inode *inode)
 {
 	errcode_t	retval;
 	struct rewrite_dir_context ctx;