summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-02-20 12:42:47 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-02-20 12:42:47 -0800
commita34dd47fd413d9c3c6f1389cc19daae187592654 (patch)
treef706316c7a7b49eef1dfbaa592c8a6a03802b493
parentadfa1f7fe62c7a04669d4da7071885585bb45162 (diff)
parentf070d34601fa2f13e74897253be3a2b3681e4014 (diff)
downloadextras-a34dd47fd413d9c3c6f1389cc19daae187592654.tar.gz
am f070d346: Merge "ext4_utils: clean up some warnings."
* commit 'f070d34601fa2f13e74897253be3a2b3681e4014': ext4_utils: clean up some warnings.
-rw-r--r--ext4_utils/contents.c2
-rw-r--r--ext4_utils/contents.h2
-rw-r--r--ext4_utils/ext2simg.c1
-rw-r--r--ext4_utils/ext4fixup.c7
-rw-r--r--ext4_utils/indirect.c6
-rw-r--r--ext4_utils/make_ext4fs.c3
6 files changed, 9 insertions, 12 deletions
diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c
index 63006808..4d45f670 100644
--- a/ext4_utils/contents.c
+++ b/ext4_utils/contents.c
@@ -190,7 +190,7 @@ u32 make_file(const char *filename, u64 len)
}
/* Creates a file on disk. Returns the inode number of the new file */
-u32 make_link(const char *filename, const char *link)
+u32 make_link(const char *link)
{
struct ext4_inode *inode;
u32 inode_num;
diff --git a/ext4_utils/contents.h b/ext4_utils/contents.h
index 35867fd1..751c0b30 100644
--- a/ext4_utils/contents.h
+++ b/ext4_utils/contents.h
@@ -35,7 +35,7 @@ struct dentry {
u32 make_directory(u32 dir_inode_num, u32 entries, struct dentry *dentries,
u32 dirs);
u32 make_file(const char *filename, u64 len);
-u32 make_link(const char *filename, const char *link);
+u32 make_link(const char *link);
int inode_set_permissions(u32 inode_num, u16 mode, u16 uid, u16 gid, u32 mtime);
int inode_set_selinux(u32 inode_num, const char *secon);
#endif
diff --git a/ext4_utils/ext2simg.c b/ext4_utils/ext2simg.c
index f4b6c93b..7b63836c 100644
--- a/ext4_utils/ext2simg.c
+++ b/ext4_utils/ext2simg.c
@@ -57,7 +57,6 @@ static int read_ext(int fd)
{
off64_t ret;
struct ext4_super_block sb;
- unsigned int i;
ret = lseek64(fd, 1024, SEEK_SET);
if (ret < 0)
diff --git a/ext4_utils/ext4fixup.c b/ext4_utils/ext4fixup.c
index f0124f88..d271116c 100644
--- a/ext4_utils/ext4fixup.c
+++ b/ext4_utils/ext4fixup.c
@@ -200,7 +200,6 @@ static int read_ext(int fd)
{
off64_t ret;
struct ext4_super_block sb;
- unsigned int i;
read_sb(fd, &sb);
@@ -510,7 +509,7 @@ static int get_block_list_indirect(int fd, struct ext4_inode *inode, unsigned lo
return count;
}
-static int get_extent_ents(int fd, struct ext4_extent_header *ext_hdr, unsigned long long *block_list)
+static int get_extent_ents(struct ext4_extent_header *ext_hdr, unsigned long long *block_list)
{
int i, j;
struct ext4_extent *extent;
@@ -560,7 +559,7 @@ static int get_extent_idx(int fd, struct ext4_extent_header *ext_hdr, unsigned l
tmp_ext_hdr = (struct ext4_extent_header *)block;
if (tmp_ext_hdr->eh_depth == 0) {
- get_extent_ents(fd, tmp_ext_hdr, block_list); /* leaf node, fill in block_list */
+ get_extent_ents(tmp_ext_hdr, block_list); /* leaf node, fill in block_list */
} else {
get_extent_idx(fd, tmp_ext_hdr, block_list); /* recurse down the tree */
}
@@ -581,7 +580,7 @@ static int get_block_list_extents(int fd, struct ext4_inode *inode, unsigned lon
}
if (extent_hdr->eh_depth == 0) {
- get_extent_ents(fd, (struct ext4_extent_header *)inode->i_block, block_list);
+ get_extent_ents((struct ext4_extent_header *)inode->i_block, block_list);
return 0;
}
diff --git a/ext4_utils/indirect.c b/ext4_utils/indirect.c
index 3d97ec84..cd826ac1 100644
--- a/ext4_utils/indirect.c
+++ b/ext4_utils/indirect.c
@@ -387,7 +387,7 @@ static int do_inode_attach_indirect(struct ext4_inode *inode,
}
static struct block_allocation *do_inode_allocate_indirect(
- struct ext4_inode *inode, u32 block_len)
+ u32 block_len)
{
u32 indirect_len = indirect_blocks_needed(block_len);
@@ -408,7 +408,7 @@ void inode_allocate_indirect(struct ext4_inode *inode, unsigned long len)
u32 block_len = DIV_ROUND_UP(len, info.block_size);
u32 indirect_len = indirect_blocks_needed(block_len);
- alloc = do_inode_allocate_indirect(inode, block_len);
+ alloc = do_inode_allocate_indirect(block_len);
if (alloc == NULL) {
error("failed to allocate extents for %lu bytes", len);
return;
@@ -494,7 +494,7 @@ u8 *inode_allocate_data_indirect(struct ext4_inode *inode, unsigned long len,
u32 block_len = DIV_ROUND_UP(len, info.block_size);
u8 *data = NULL;
- alloc = do_inode_allocate_indirect(inode, block_len);
+ alloc = do_inode_allocate_indirect(block_len);
if (alloc == NULL) {
error("failed to allocate extents for %lu bytes", len);
return NULL;
diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
index b2d14263..17b7ae68 100644
--- a/ext4_utils/make_ext4fs.c
+++ b/ext4_utils/make_ext4fs.c
@@ -258,7 +258,7 @@ static u32 build_directory_structure(const char *full_path, const char *dir_path
free(subdir_full_path);
free(subdir_dir_path);
} else if (dentries[i].file_type == EXT4_FT_SYMLINK) {
- entry_inode = make_link(dentries[i].full_path, dentries[i].link);
+ entry_inode = make_link(dentries[i].link);
} else {
error("unknown file type on %s", dentries[i].path);
entry_inode = 0;
@@ -451,7 +451,6 @@ int make_ext4fs_internal(int fd, const char *_directory,
u16 root_mode;
char *mountpoint;
char *directory = NULL;
- int ret;
if (setjmp(setjmp_env))
return EXIT_FAILURE; /* Handle a call to longjmp() */