block-dmg.c: fix signedness gcc4 warning
PATCH 1/1 block-dmg.c: fix signedness gcc4 warning
Hi,
gcc4 is more picky about signedness. Please apply.
block-dmg.c +4 -4
@@ -44,8 +44,8 @@uint64_t * sectors;uint64_t * sectorcounts;uint32_t current_chunk; -char * compressed_chunk; -char * uncompressed_chunk; +unsigned char * compressed_chunk; +unsigned char * uncompressed_chunk;z_stream zstream; } BDRVDMGState;
@@ -159,9 +159,9 @@ }/* initialize zlib engine */ -if (!(s->compressed_chunk=(char *)malloc (max_compressed_size+1 ))) +if (!(s->compressed_chunk=(unsigned char *)malloc (max_compressed_size+1 ))) goto dmg_close; -if (!(s->uncompressed_chunk=(char *)malloc (512 *max_sectors_per_chunk))) +if (!(s->uncompressed_chunk=(unsigned char *)malloc (512 *max_sectors_per_chunk))) goto dmg_close;if (inflateInit (&s->zstream) !=Z_OK ) goto dmg_close;
Signature · 4 lines
Pavel Janík
Write and test a big program in small pieces.
-- The Elements of Programming Style (Kernighan & Plaugher)