From: Pierre Ossman Date: Wed, 17 Jun 2015 08:47:28 +0000 (+0200) Subject: Fix some bad signed/unsigned mismatches X-Git-Tag: v1.4.90~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a9af1f12466e201fed5a72bbba2607fb55f7e042;p=tigervnc.git Fix some bad signed/unsigned mismatches --- diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h index bc6ae5bd..72ffc1df 100644 --- a/common/rfb/VNCSConnectionST.h +++ b/common/rfb/VNCSConnectionST.h @@ -186,7 +186,7 @@ namespace rfb { unsigned baseRTT; unsigned congWindow; - int ackedOffset, sentOffset; + unsigned ackedOffset, sentOffset; unsigned minRTT; bool seenCongestion; diff --git a/unix/tx/TXWindow.cxx b/unix/tx/TXWindow.cxx index 1f69702a..a6819179 100644 --- a/unix/tx/TXWindow.cxx +++ b/unix/tx/TXWindow.cxx @@ -89,11 +89,11 @@ void TXWindow::init(Display* dpy, const char* defaultWindowClass_) XSetFont(dpy, defaultGC, defaultFont); XSelectInput(dpy, DefaultRootWindow(dpy), PropertyChangeMask); - static char dotBits[] = { 0x06, 0x0f, 0x0f, 0x06}; - dot = XCreateBitmapFromData(dpy, DefaultRootWindow(dpy), dotBits, + static unsigned char dotBits[] = { 0x06, 0x0f, 0x0f, 0x06}; + dot = XCreateBitmapFromData(dpy, DefaultRootWindow(dpy), (char*)dotBits, dotSize, dotSize); - static char tickBits[] = { 0x80, 0xc0, 0xe2, 0x76, 0x3e, 0x1c, 0x08, 0x00}; - tick = XCreateBitmapFromData(dpy, DefaultRootWindow(dpy), tickBits, + static unsigned char tickBits[] = { 0x80, 0xc0, 0xe2, 0x76, 0x3e, 0x1c, 0x08, 0x00}; + tick = XCreateBitmapFromData(dpy, DefaultRootWindow(dpy), (char*)tickBits, tickSize, tickSize); defaultWindowClass = rfb::strDup(defaultWindowClass_); } diff --git a/vncviewer/parameters.cxx b/vncviewer/parameters.cxx index bf390103..7cce1cd7 100644 --- a/vncviewer/parameters.cxx +++ b/vncviewer/parameters.cxx @@ -182,7 +182,7 @@ static bool encodeValue(const char* val, char* dest, size_t destSize) { bool normalCharacter = true; size_t pos = 0; - for (int i = 0; (val[i] != '\0') && (i < (destSize - 1)); i++) { + for (size_t i = 0; (val[i] != '\0') && (i < (destSize - 1)); i++) { // Check for sequences which will need encoding if (val[i] == '\\') { @@ -229,7 +229,7 @@ static bool decodeValue(const char* val, char* dest, size_t destSize) { size_t pos = 0; bool escapedCharacter = false; - for (int i = 0; (val[i] != '\0') && (i < (destSize - 1)); i++) { + for (size_t i = 0; (val[i] != '\0') && (i < (destSize - 1)); i++) { // Check for escape sequences if (val[i] == '\\') { diff --git a/win/rfb_win32/SInput.cxx b/win/rfb_win32/SInput.cxx index f6345665..111a4d90 100644 --- a/win/rfb_win32/SInput.cxx +++ b/win/rfb_win32/SInput.cxx @@ -66,7 +66,7 @@ static DWORD buttonUpMapping[8] = { }; static DWORD buttonDataMapping[8] = { - 0, 0, 0, 120, -120, 0, 0, 0 + 0, 0, 0, 120, (DWORD)-120, 0, 0, 0 }; win32::SPointer::SPointer()