Skip to content

Commit

Permalink
UDF: Fix compiler warning
Browse files Browse the repository at this point in the history
Fix compiler warning

fs/udf/balloc.c: In function 'udf_bitmap_new_block':
fs/udf/balloc.c:273: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
fs/udf/balloc.c:285: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
fs/udf/balloc.c:311: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type
fs/udf/balloc.c:325: warning: passing argument 1 of '_find_next_bit_le' from incompatible pointer type

The main fix is to add a cast in ext2_find_next_bit().

As all other usage locations of udf_find_next_one_bit()
directly use bh->b_data (which is a char *), the useless
(char *) cast in line 311 can be removed, too.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: George G. Davis <gdavis@mvista.com>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Dirk Behme authored and Jan Kara committed Feb 23, 2011
1 parent 7e49b6f commit 6f644e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/udf/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define udf_set_bit(nr, addr) ext2_set_bit(nr, addr)
#define udf_test_bit(nr, addr) ext2_test_bit(nr, addr)
#define udf_find_next_one_bit(addr, size, offset) \
ext2_find_next_bit(addr, size, offset)
ext2_find_next_bit((unsigned long *)(addr), size, offset)

static int read_block_bitmap(struct super_block *sb,
struct udf_bitmap *bitmap, unsigned int block,
Expand Down Expand Up @@ -297,7 +297,7 @@ static int udf_bitmap_new_block(struct super_block *sb,
break;
}
} else {
bit = udf_find_next_one_bit((char *)bh->b_data,
bit = udf_find_next_one_bit(bh->b_data,
sb->s_blocksize << 3,
group_start << 3);
if (bit < sb->s_blocksize << 3)
Expand Down

0 comments on commit 6f644e5

Please sign in to comment.