From fe1ca16e9b75b5f38ab374c8dfff92d2c3ea4532 Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Thu, 17 Mar 2011 14:43:55 +0100 Subject: Fix (most) MinGW32 compiler warnings. --- libvncclient/listen.c | 1 + libvncclient/rfbproto.c | 2 ++ libvncclient/ultra.c | 6 +++--- libvncclient/zrle.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'libvncclient') diff --git a/libvncclient/listen.c b/libvncclient/listen.c index 637abb1..58275a0 100644 --- a/libvncclient/listen.c +++ b/libvncclient/listen.c @@ -29,6 +29,7 @@ #ifdef __MINGW32__ #define close closesocket #include +#undef max #else #include #include diff --git a/libvncclient/rfbproto.c b/libvncclient/rfbproto.c index dd06ebd..d10e8a6 100644 --- a/libvncclient/rfbproto.c +++ b/libvncclient/rfbproto.c @@ -1045,7 +1045,9 @@ InitialiseRFBConnection(rfbClient* client) rfbProtocolVersionMsg pv; int major,minor; uint32_t authScheme; +#ifdef LIBVNCSERVER_WITH_CLIENT_TLS uint32_t subAuthScheme; +#endif rfbClientInitMsg ci; /* if the connection is immediately closed, don't report anything, so diff --git a/libvncclient/ultra.c b/libvncclient/ultra.c index 3be150d..dddb0c0 100644 --- a/libvncclient/ultra.c +++ b/libvncclient/ultra.c @@ -37,7 +37,7 @@ HandleUltraBPP (rfbClient* client, int rx, int ry, int rw, int rh) rfbZlibHeader hdr; int toRead=0; int inflateResult=0; - int uncompressedBytes = (( rw * rh ) * ( BPP / 8 )); + lzo_uint uncompressedBytes = (( rw * rh ) * ( BPP / 8 )); if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)) return FALSE; @@ -119,7 +119,7 @@ HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh) int toRead=0; int inflateResult=0; unsigned char *ptr=NULL; - int uncompressedBytes = ry + (rw * 65535); + lzo_uint uncompressedBytes = ry + (rw * 65535); unsigned int numCacheRects = rx; if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)) @@ -170,7 +170,7 @@ HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh) uncompressedBytes = client->raw_buffer_size; inflateResult = lzo1x_decompress( (lzo_byte *)client->ultra_buffer, toRead, - (lzo_byte *)client->raw_buffer, (lzo_uintp) &uncompressedBytes, NULL); + (lzo_byte *)client->raw_buffer, &uncompressedBytes, NULL); if ( inflateResult != LZO_E_OK ) { rfbClientLog("ultra decompress returned error: %d\n", diff --git a/libvncclient/zrle.c b/libvncclient/zrle.c index 16fc091..a14ad44 100644 --- a/libvncclient/zrle.c +++ b/libvncclient/zrle.c @@ -363,7 +363,7 @@ static int HandleZRLETile(rfbClient* client, { return -8; } - else if( (type >= 130)&&(type <= 255) ) /* palette RLE */ + else if( type >= 130 ) /* palette RLE */ { CARDBPP palette[128]; int i,j; -- cgit v1.1