summaryrefslogtreecommitdiff
path: root/debugfs
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2018-06-23 23:00:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-06-23 23:00:50 -0400
commitac3256fd31d47ec75fababa7c1cd5d679750ed6f (patch)
tree607fd6456fa465326f10a89563ab303e8638d343 /debugfs
parent60afa1d81664f8f7f39d5e4cf70b397e8d7154a7 (diff)
Fix gcc and clang warnings
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'debugfs')
-rw-r--r--debugfs/debugfs.c7
-rw-r--r--debugfs/debugfs.h1
-rw-r--r--debugfs/xattrs.c4
3 files changed, 5 insertions, 7 deletions
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index a270e8c2..2bf6a30c 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -60,8 +60,9 @@ static int debugfs_setup_tdb(const char *device_name, char *undo_file,
io_manager *io_ptr)
{
errcode_t retval = ENOMEM;
- char *tdb_dir = NULL, *tdb_file = NULL;
- char *dev_name, *tmp_name;
+ const char *tdb_dir = NULL;
+ char *tdb_file = NULL;
+ char *dev_name, *tmp_name;
/* (re)open a specific undo file */
if (undo_file && undo_file[0] != 0) {
@@ -2103,7 +2104,6 @@ void do_idump(int argc, char *argv[])
reset_getopt();
while ((c = getopt (argc, argv, "bex")) != EOF) {
if (mode || c == '?') {
- print_usage:
com_err(argv[0], 0,
"Usage: inode_dump [-b]|[-e] <file>");
return;
@@ -2144,7 +2144,6 @@ void do_idump(int argc, char *argv[])
case 'x':
case 'e':
if (size <= EXT2_GOOD_OLD_INODE_SIZE) {
- no_extra_space:
com_err(argv[0], 0, "No extra space in inode");
goto err;
}
diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h
index 3322d05a..93f036de 100644
--- a/debugfs/debugfs.h
+++ b/debugfs/debugfs.h
@@ -137,6 +137,7 @@ extern void do_rm(int argc, char **argv);
extern void do_link(int argc, char **argv);
extern void do_undel(int argc, char **argv);
extern void do_unlink(int argc, char **argv);
+extern void do_copy_inode(int argc, char *argv[]);
extern void do_find_free_block(int argc, char **argv);
extern void do_find_free_inode(int argc, char **argv);
extern void do_stat(int argc, char **argv);
diff --git a/debugfs/xattrs.c b/debugfs/xattrs.c
index 6c32712a..c29761ec 100644
--- a/debugfs/xattrs.c
+++ b/debugfs/xattrs.c
@@ -406,7 +406,6 @@ static void dump_xattr_raw_entries(FILE *f, unsigned char *buf,
unsigned value_start)
{
struct ext2_ext_attr_entry ent;
- char *name;
unsigned int off = start;
unsigned int vstart;
@@ -417,7 +416,6 @@ static void dump_xattr_raw_entries(FILE *f, unsigned char *buf,
break;
}
if ((off + sizeof(struct ext2_ext_attr_entry)) >= len) {
- overrun:
fprintf(f, "xattr buffer overrun at %u (len = %u)\n",
off, len);
break;
@@ -456,7 +454,7 @@ static void dump_xattr_raw_entries(FILE *f, unsigned char *buf,
ent.e_value_size);
else {
fprintf(f, "<hexdump>\n");
- do_byte_hexdump(f, (char *)(buf + vstart),
+ do_byte_hexdump(f, (unsigned char *)(buf + vstart),
ent.e_value_size);
}
fputc('\n', f);