[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] block-dmg.c: fix signedness gcc4 warning
From: |
Pavel Janík |
Subject: |
[Qemu-devel] [PATCH] block-dmg.c: fix signedness gcc4 warning |
Date: |
Wed, 04 Jan 2006 20:56:58 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Hi,
gcc4 is more picky about signedness. Please apply.
--- block-dmg.c 31 May 2005 22:45:24 +0200 1.3
+++ block-dmg.c 04 Jan 2006 20:38:26 +0100
@@ -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;
--
Pavel Janík
Write and test a big program in small pieces.
-- The Elements of Programming Style (Kernighan & Plaugher)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] block-dmg.c: fix signedness gcc4 warning,
Pavel Janík <=