From 9b2a9f0210f13f1c59c0b954c4aa0eeb0a66efd1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 29 Nov 2013 16:43:33 +0100 Subject: fix assorted unused code and wrong format specs found by cppchekc (bug 6716) Signed-off-by: Denys Vlasenko --- e2fsprogs/old_e2fsprogs/e2fsck.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'e2fsprogs/old_e2fsprogs/e2fsck.c') diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c index 373e8ce91..8400a92ce 100644 --- a/e2fsprogs/old_e2fsprogs/e2fsck.c +++ b/e2fsprogs/old_e2fsprogs/e2fsck.c @@ -1050,7 +1050,7 @@ static errcode_t ea_refcount_create(int size, ext2_refcount_t *ret) refcount->size = size; bytes = (size_t) (size * sizeof(struct ea_refcount_el)); #ifdef DEBUG - printf("Refcount allocated %d entries, %d bytes.\n", + printf("Refcount allocated %d entries, %lu bytes.\n", refcount->size, bytes); #endif retval = ext2fs_get_mem(bytes, &refcount->list); @@ -3424,7 +3424,7 @@ static void e2fsck_pass1(e2fsck_t ctx) continue; } if ((inode->i_links_count || inode->i_blocks || - inode->i_blocks || inode->i_block[0]) && + inode->i_block[0]) && fix_problem(ctx, PR_1_JOURNAL_INODE_NOT_CLEAR, &pctx)) { memset(inode, 0, inode_size); @@ -12195,11 +12195,7 @@ static void swap_filesys(e2fsck_t ctx) void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size, const char *description) { - void *ret; - char buf[256]; - - ret = xzalloc(size); - return ret; + return xzalloc(size); } static char *string_copy(const char *str, int len) -- cgit v1.2.3