From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdkLR-0006Ft-5A for qemu-devel@nongnu.org; Sun, 01 Mar 2009 07:00:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdkLP-0006Fh-6W for qemu-devel@nongnu.org; Sun, 01 Mar 2009 07:00:31 -0500 Received: from [199.232.76.173] (port=57676 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdkLP-0006Fe-0P for qemu-devel@nongnu.org; Sun, 01 Mar 2009 07:00:31 -0500 Received: from fe02x03-cgp.akado.ru ([77.232.31.165]:51113 helo=akado.ru) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LdkLO-0003gd-Dw for qemu-devel@nongnu.org; Sun, 01 Mar 2009 07:00:30 -0500 Received: from [10.0.66.9] ([10.0.66.9] verified) by fe02-cgp.akado.ru (CommuniGate Pro SMTP 5.1.16) with ESMTP id 45434080 for qemu-devel@nongnu.org; Sun, 01 Mar 2009 15:00:01 +0300 Date: Sun, 1 Mar 2009 15:00:01 +0300 (MSK) From: malc Subject: Re: [Qemu-devel] [PATCH] Fix some compiler warnings for windows In-Reply-To: <49AA65B9.8000709@mail.berlios.de> Message-ID: References: <4995E56F.4080200@mail.berlios.de> <49AA65B9.8000709@mail.berlios.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Sun, 1 Mar 2009, Stefan Weil wrote: > Stefan Weil schrieb: > > Hello, > > > > this patch fixes some warnings for compilation with mingw32. > > > > Regards > > Stefan Weil > > Here is an update of my patch for the current Qemu trunk. > It reduces the number of warnings for win32 from 256 to 67. > > At least one warning indicates an error in Qemu for Windows: > vl.c:5386: warning: fds[1] is used uninitialized in this function > This was fixed, too. > > Could one of the maintainers please apply this patch to Qemu trunk? Index: trunk/block-raw-win32.c =================================================================== --- trunk.orig/block-raw-win32.c 2009-03-01 11:04:03.000000000 +0100 +++ trunk/block-raw-win32.c 2009-03-01 11:04:10.000000000 +0100 @@ -279,7 +279,7 @@ static int raw_truncate(BlockDriverState *bs, int64_t offset) { BDRVRawState *s = bs->opaque; - DWORD low, high; + LONG low, high; low = offset; high = offset >> 32; @@ -301,7 +301,8 @@ switch(s->type) { case FTYPE_FILE: - l.LowPart = GetFileSize(s->hfile, &l.HighPart); + l.LowPart = GetFileSize(s->hfile, &count); + l.HighPart = count; if (l.LowPart == 0xffffffffUL && GetLastError() != NO_ERROR) return -EIO; break; [..snip..] http://msdn.microsoft.com/en-us/library/aa364955(VS.85).aspx DWORD WINAPI GetFileSize( __in HANDLE hFile, __out_opt LPDWORD lpFileSizeHigh ); IOW LONG doesn't seem to be correct. -- mailto:av1474@comtv.ru