Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuErm-0004yO-9n for qemu-devel@nongnu.org; Wed, 04 Jan 2006 15:04:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuErj-0004xx-Ut for qemu-devel@nongnu.org; Wed, 04 Jan 2006 15:04:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuErj-0004xq-OI for qemu-devel@nongnu.org; Wed, 04 Jan 2006 15:04:11 -0500 Received: from [212.20.112.165] (helo=pavel.int.rudna.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EuEtA-0002qA-T6 for qemu-devel@nongnu.org; Wed, 04 Jan 2006 15:05:41 -0500 From: Pavel@Janik.cz (Pavel =?iso-8859-2?Q?Jan=EDk?=) Date: Wed, 04 Jan 2006 20:56:58 +0100 Message-ID: <8764ozzrzp.fsf@Janik.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] block-dmg.c: fix signedness gcc4 warning Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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=09 @@ -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; =20 @@ -159,9 +159,9 @@ } =20 /* initialize zlib engine */ - if(!(s->compressed_chunk=3D(char*)malloc(max_compressed_size+1))) + if(!(s->compressed_chunk=3D(unsigned char*)malloc(max_compressed_siz= e+1))) goto dmg_close; - if(!(s->uncompressed_chunk=3D(char*)malloc(512*max_sectors_per_chunk= ))) + if(!(s->uncompressed_chunk=3D(unsigned char*)malloc(512*max_sectors_= per_chunk))) goto dmg_close; if(inflateInit(&s->zstream) !=3D Z_OK) goto dmg_close; --=20 Pavel Jan=EDk Write and test a big program in small pieces. -- The Elements of Programming Style (Kernighan & Plaug= her)