summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-03-03 16:39:37 +0100
committerPierre Ossman <ossman@cendio.se>2015-03-03 16:39:37 +0100
commit7728be27d08e7ae362a15a2affb1f502d439b561 (patch)
treebae3d8008ef6126b091cfa096621b43a11812a50
parentb1cd6ca8f0c6c77ec66cba47004137297ae020d6 (diff)
downloadtigervnc-7728be27d08e7ae362a15a2affb1f502d439b561.tar.gz
tigervnc-7728be27d08e7ae362a15a2affb1f502d439b561.zip
Add extra parentheses to avoid and/or priority ambiguity
-rw-r--r--common/rfb/VNCSConnectionST.cxx2
-rw-r--r--unix/vncconfig/vncExt.c2
-rw-r--r--win/rfb_win32/WMCursor.cxx3
3 files changed, 4 insertions, 3 deletions
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 5adb766e..932abc0b 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -1131,7 +1131,7 @@ void VNCSConnectionST::setStatus(int status)
accessRights = accessRights | AccessPtrEvents | AccessKeyEvents | AccessView;
break;
case 1:
- accessRights = accessRights & ~(AccessPtrEvents | AccessKeyEvents) | AccessView;
+ accessRights = (accessRights & ~(AccessPtrEvents | AccessKeyEvents)) | AccessView;
break;
case 2:
accessRights = accessRights & ~(AccessPtrEvents | AccessKeyEvents | AccessView);
diff --git a/unix/vncconfig/vncExt.c b/unix/vncconfig/vncExt.c
index c2e6d3c1..f4ade8c1 100644
--- a/unix/vncconfig/vncExt.c
+++ b/unix/vncconfig/vncExt.c
@@ -328,7 +328,7 @@ Bool XVncExtGetQueryConnect(Display* dpy, char** addr, char** user,
if (!*addr || !*user) {
Xfree(*addr);
Xfree(*user);
- _XEatData(dpy, (rep.addrLen+1)&~1 + (rep.userLen+1)&~1);
+ _XEatData(dpy, ((rep.addrLen+1)&~1) + ((rep.userLen+1)&~1));
return False;
}
_XReadPad(dpy, *addr, rep.addrLen);
diff --git a/win/rfb_win32/WMCursor.cxx b/win/rfb_win32/WMCursor.cxx
index 4d696cbc..fa158335 100644
--- a/win/rfb_win32/WMCursor.cxx
+++ b/win/rfb_win32/WMCursor.cxx
@@ -49,7 +49,8 @@ WMCursor::WMCursor() : hooks(0), use_getCursorInfo(false), cursor(0) {
#ifdef RFB_HAVE_GETCURSORINFO
// Check the OS version
bool is_win98 = (osVersion.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) &&
- (osVersion.dwMajorVersion > 4) || ((osVersion.dwMajorVersion == 4) && (osVersion.dwMinorVersion > 0));
+ ((osVersion.dwMajorVersion > 4) ||
+ ((osVersion.dwMajorVersion == 4) && (osVersion.dwMinorVersion > 0)));
bool is_win2K = (osVersion.dwPlatformId == VER_PLATFORM_WIN32_NT) && (osVersion.dwMajorVersion >= 5);
// Use GetCursorInfo if OS version is sufficient