From 42080a8656895eddb0e054c3af86667a5a6aff9f Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sat, 11 Jul 2009 23:23:16 -0400 Subject: [PATCH] debugfs: Fix miscellaneous gcc -Wall warnings Signed-off-by: "Theodore Ts'o" --- debugfs/debugfs.c | 2 +- debugfs/debugfs.h | 1 + debugfs/htree.c | 8 +++++--- debugfs/ncheck.c | 2 -- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 94ffc6f..1710aa2 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -1871,7 +1871,7 @@ static int find_supp_feature(__u32 *supp, int feature_type, char *name) void do_supported_features(int argc, char *argv[]) { - int i, j, ret; + int ret; __u32 supp[3] = { EXT2_LIB_FEATURE_COMPAT_SUPP, EXT2_LIB_FEATURE_INCOMPAT_SUPP, EXT2_LIB_FEATURE_RO_COMPAT_SUPP }; diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h index 3c0f016..bbfa760 100644 --- a/debugfs/debugfs.h +++ b/debugfs/debugfs.h @@ -124,4 +124,5 @@ extern void do_features(int argc, char **argv); extern void do_bmap(int argc, char **argv); extern void do_imap(int argc, char **argv); extern void do_set_current_time(int argc, char **argv); +extern void do_supported_features(int argc, char **argv); diff --git a/debugfs/htree.c b/debugfs/htree.c index 01e4ca5..77dc88b 100644 --- a/debugfs/htree.c +++ b/debugfs/htree.c @@ -23,6 +23,8 @@ extern char *optarg; #endif #include "debugfs.h" +#include "uuid/uuid.h" +#include "e2p/e2p.h" static FILE *pager; @@ -75,7 +77,7 @@ static void htree_dump_leaf_node(ext2_filsys fs, ext2_ino_t ino, if (((offset + rec_len) > fs->blocksize) || (rec_len < 8) || ((rec_len % 4) != 0) || - (((dirent->name_len & 0xFF)+8) > rec_len)) { + ((((unsigned) dirent->name_len & 0xFF)+8) > rec_len)) { fprintf(pager, "Corrupted directory block (%u)!\n", blk); break; } @@ -309,7 +311,7 @@ void do_dx_hash(int argc, char *argv[]) hash_version = atoi(optarg); break; case 's': - if (uuid_parse(optarg, hash_seed)) { + if (uuid_parse(optarg, (unsigned char *) hash_seed)) { fprintf(stderr, "Invalid UUID format: %s\n", optarg); return; @@ -413,7 +415,7 @@ static int search_dir_block(ext2_filsys fs, blk_t *blocknr, com_err("htree_dump_leaf_inode", errcode, "while getting rec_len for block %lu", (unsigned long) *blocknr); - return; + return BLOCK_ABORT; } if (dirent->inode && p->len == (dirent->name_len & 0xFF) && diff --git a/debugfs/ncheck.c b/debugfs/ncheck.c index 166be6b..a366281 100644 --- a/debugfs/ncheck.c +++ b/debugfs/ncheck.c @@ -34,8 +34,6 @@ static int ncheck_proc(struct ext2_dir_entry *dirent, { struct inode_walk_struct *iw = (struct inode_walk_struct *) private; int i; - char *pathname; - errcode_t retval; iw->position++; if (iw->position <= 2) -- 1.8.3.1