Commit b9e82a59 authored by Blue Swirl's avatar Blue Swirl
Browse files

Fix some win32 compile warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6984 c046a42c-6fe2-441c-8c8c-71466251a162
parent 1625af87
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ static void raw_close(BlockDriverState *bs)
static int raw_truncate(BlockDriverState *bs, int64_t offset)
{
    BDRVRawState *s = bs->opaque;
    DWORD low, high;
    LONG low, high;

    low = offset;
    high = offset >> 32;
@@ -188,7 +188,7 @@ static int64_t raw_getlength(BlockDriverState *bs)

    switch(s->type) {
    case FTYPE_FILE:
        l.LowPart = GetFileSize(s->hfile, &l.HighPart);
        l.LowPart = GetFileSize(s->hfile, (PDWORD)&l.HighPart);
        if (l.LowPart == 0xffffffffUL && GetLastError() != NO_ERROR)
            return -EIO;
        break;
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
 */
#include "config.h"
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#else
#include <sys/types.h>
+1 −1
Original line number Diff line number Diff line
@@ -579,7 +579,7 @@ int nbd_trip(BlockDriverState *bs, int csock, off_t size, uint64_t dev_offset,
	if ((request.from + request.len) > size) {
	        LOG("From: %" PRIu64 ", Len: %u, Size: %" PRIu64
		    ", Offset: %" PRIu64 "\n",
		     request.from, request.len, size, dev_offset);
                    request.from, request.len, (uint64_t)size, dev_offset);
		LOG("requested operation past EOF--bad client?");
		errno = EINVAL;
		return -1;
+1 −1
Original line number Diff line number Diff line
@@ -1903,9 +1903,9 @@ done:

void net_cleanup(void)
{
#if !defined(_WIN32)
    VLANState *vlan;

#if !defined(_WIN32)
    /* close network clients */
    for(vlan = first_vlan; vlan != NULL; vlan = vlan->next) {
        VLANClientState *vc;
+5 −1
Original line number Diff line number Diff line
@@ -777,7 +777,11 @@ void
fd_nonblock(int fd)
{
#ifdef FIONBIO
#ifdef _WIN32
        long opt = 1;
#else
        int opt = 1;
#endif

	ioctlsocket(fd, FIONBIO, &opt);
#else
Loading