From 6ca2aa1284a5e82df0193d2727941420361bc50f Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Tue, 29 Dec 2015 18:11:06 +0100 Subject: fix compiler warnings in hurd/ext2fs ext2fs: Fix compiler warnings. * ext2fs/balloc.c: Use unsigned char instead of char. * ext2fs/bitmap.c Use unsigned char for bitmaps. * ext2fs/dir.c: Fix format. * ext2fs/ext2fs.h: Use unsigned char for bitmaps. * ext2fs/ialloc.c: Use unsigned char for bitmaps. Fix format string in ext2_warning. * ext2fs/pager.c: Fix format string in ext2_warning and ext2_error. --- ext2fs/balloc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ext2fs/balloc.c') diff --git a/ext2fs/balloc.c b/ext2fs/balloc.c index efef8ae4..0b9e5a52 100644 --- a/ext2fs/balloc.c +++ b/ext2fs/balloc.c @@ -57,7 +57,7 @@ memscan (void *buf, unsigned char ch, size_t len) void ext2_free_blocks (block_t block, unsigned long count) { - char *bh; + unsigned char *bh; unsigned long block_group; unsigned long bit; unsigned long i; @@ -140,8 +140,8 @@ ext2_new_block (block_t goal, block_t prealloc_goal, block_t *prealloc_count, block_t *prealloc_block) { - char *bh = NULL; - char *p, *r; + unsigned char *bh = NULL; + unsigned char *p, *r; int i, j, k, tmp; unsigned long lmap; struct ext2_group_desc *gdp; @@ -231,9 +231,9 @@ repeat: * Search first in the remainder of the current group; then, * cyclicly search through the rest of the groups. */ - p = ((char *) bh) + (j >> 3); + p = bh + (j >> 3); r = memscan (p, 0, (sblock->s_blocks_per_group - j + 7) >> 3); - k = (r - ((char *) bh)) << 3; + k = (r - bh) << 3; if (k < sblock->s_blocks_per_group) { j = k; @@ -434,7 +434,7 @@ block_in_use (block_t block, unsigned char *map) void ext2_check_blocks_bitmap () { - char *bh; + unsigned char *bh; unsigned long desc_count, bitmap_count, x; unsigned long desc_blocks; struct ext2_group_desc *gdp; -- cgit v1.2.3