diff options
author | Karel Zak | 2012-08-29 20:30:11 +0200 |
---|---|---|
committer | Karel Zak | 2012-09-04 16:49:28 +0200 |
commit | aa71999827c5a1436eca184d25f1906dacec5e63 (patch) | |
tree | e24f84526e16cf1acf418293242915c8fa4523be /disk-utils/fsck.cramfs.c | |
parent | build-sys: add another compiler warnings (diff) | |
download | kernel-qcow2-util-linux-aa71999827c5a1436eca184d25f1906dacec5e63.tar.gz kernel-qcow2-util-linux-aa71999827c5a1436eca184d25f1906dacec5e63.tar.xz kernel-qcow2-util-linux-aa71999827c5a1436eca184d25f1906dacec5e63.zip |
fsck.cramfs: fix compiler warning [-Wpointer-arith]
disk-utils/fsck.cramfs.c: In function ‘test_crc’:
disk-utils/fsck.cramfs.c:231:32: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
disk-utils/fsck.cramfs.c:233:24: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fsck.cramfs.c')
-rw-r--r-- | disk-utils/fsck.cramfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/disk-utils/fsck.cramfs.c b/disk-utils/fsck.cramfs.c index 04f970f6a..b39d2310b 100644 --- a/disk-utils/fsck.cramfs.c +++ b/disk-utils/fsck.cramfs.c @@ -228,9 +228,9 @@ static void test_crc(int start) } } if (buf != MAP_FAILED) { - ((struct cramfs_super *)(buf + start))->fsid.crc = + ((struct cramfs_super *)((unsigned char *) buf + start))->fsid.crc = crc32(0L, Z_NULL, 0); - crc = crc32(crc, buf + start, super.size - start); + crc = crc32(crc, (unsigned char *) buf + start, super.size - start); munmap(buf, super.size); } else { int retval; |