diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-12-14 10:49:21 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-14 10:49:21 +0100 |
commit | 1d301c517e613dbb7e14e8b5fe5552919366fc4e (patch) | |
tree | fbcc0812cafcd14eb4512bb66b751314736671fc /nx-X11 | |
parent | 91ca51bffc299519f723cc3adeb207bbad8a26c3 (diff) | |
parent | 8bb1579f40bb74b9dad302e79c124541694b3265 (diff) | |
download | nx-libs-1d301c517e613dbb7e14e8b5fe5552919366fc4e.tar.gz nx-libs-1d301c517e613dbb7e14e8b5fe5552919366fc4e.tar.bz2 nx-libs-1d301c517e613dbb7e14e8b5fe5552919366fc4e.zip |
Merge branch 'sunweaver-pr/fix-compiler-warnings' into 3.6.x
Attributes GH PR #333: https://github.com/ArcticaProject/nx-libs/pull/333
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/lib/src/Xrm.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glxcmds.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glxfb.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/unpack.h | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/Xi/chgfctl.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 24 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c | 28 |
8 files changed, 40 insertions, 28 deletions
diff --git a/nx-X11/lib/src/Xrm.c b/nx-X11/lib/src/Xrm.c index e3587d021..c285e4221 100644 --- a/nx-X11/lib/src/Xrm.c +++ b/nx-X11/lib/src/Xrm.c @@ -897,7 +897,7 @@ static void PutEntry( /* bump to loose table, if any */ table = *(prev = &table->next); if (!table || table->name != q || - !quarks[2] != table->leaf) + (!quarks[2]) != table->leaf) break; /* not found */ } } diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmds.c b/nx-X11/programs/Xserver/GL/glx/glxcmds.c index efe5b25e9..602b79099 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxcmds.c +++ b/nx-X11/programs/Xserver/GL/glx/glxcmds.c @@ -1762,7 +1762,7 @@ static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) if (ret == Success) { if (barrier) /* add source for cleanup when drawable is gone */ - AddResource(drawable, __glXSwapBarrierRes, (void *)screen); + AddResource(drawable, __glXSwapBarrierRes, (void *)(intptr_t)screen); else /* delete source */ FreeResourceByType(drawable, __glXSwapBarrierRes, FALSE); diff --git a/nx-X11/programs/Xserver/GL/glx/glxfb.c b/nx-X11/programs/Xserver/GL/glx/glxfb.c index 7248b6ffb..13f02d448 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxfb.c +++ b/nx-X11/programs/Xserver/GL/glx/glxfb.c @@ -113,7 +113,7 @@ __glXFBMemSwapBuffers(__GLXdrawablePrivate *glxPriv) depth, 0, 0, width, height, pad, ZPixmap, - buf); + (char *)buf); return GL_TRUE; } diff --git a/nx-X11/programs/Xserver/GL/glx/unpack.h b/nx-X11/programs/Xserver/GL/glx/unpack.h index 7d84ff575..9554ba4b9 100644 --- a/nx-X11/programs/Xserver/GL/glx/unpack.h +++ b/nx-X11/programs/Xserver/GL/glx/unpack.h @@ -52,7 +52,7 @@ ** Fetch a double from potentially unaligned memory. */ #ifdef __GLX_ALIGN64 -#define __GLX_MEM_COPY(dst,src,n) if (src && dst) memcpy(dst,src,n) +#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n) #define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8) #else #define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src)) diff --git a/nx-X11/programs/Xserver/Xi/chgfctl.c b/nx-X11/programs/Xserver/Xi/chgfctl.c index 341c794ce..a5ad73d11 100644 --- a/nx-X11/programs/Xserver/Xi/chgfctl.c +++ b/nx-X11/programs/Xserver/Xi/chgfctl.c @@ -358,9 +358,9 @@ ChangeKbdFeedback (client, dev, mask, k, f) kctrl.autoRepeat = defaultKeyboardControl.autoRepeat; else kctrl.autoRepeats[inx] &= ~kmask; - kctrl.autoRepeats[inx] = - (kctrl.autoRepeats[inx] & ~kmask) | - (defaultKeyboardControl.autoRepeats[inx] & kmask); + kctrl.autoRepeats[inx] = + (kctrl.autoRepeats[inx] & ~kmask) | + (defaultKeyboardControl.autoRepeats[inx] & kmask); } else { diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 61d39ee98..c186c1508 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -4664,12 +4664,12 @@ void nxagentDumpInputDevicesState(void) } } - fprintf(stderr, "\nKeyboard device state: \n\tdevice [%p]\n\tlast grab time [%lu]" + fprintf(stderr, "\nKeyboard device state: \n\tdevice [%p]\n\tlast grab time [%u]" "\n\tfrozen [%s]\n\tstate [%s]\n\tother [%p]\n\tevent count [%d]" - "\n\tfrom passive grab [%s]\n\tactivating key [%d]", dev, + "\n\tfrom passive grab [%s]\n\tactivating key [%d]", (void *)dev, dev -> grabTime.milliseconds, dev -> sync.frozen ? "Yes": "No", nxagentGrabStateToString(dev -> sync.state), - dev -> sync.other, dev -> sync.evcount, + (void *)dev -> sync.other, dev -> sync.evcount, dev -> fromPassiveGrab ? "Yes" : "No", dev -> activatingKey); @@ -4679,7 +4679,7 @@ void nxagentDumpInputDevicesState(void) { fprintf(stderr, "\nKeyboard grab state: \n\twindow pointer [%p]" "\n\towner events flag [%s]\n\tgrab mode [%s]", - grab -> window, grab -> ownerEvents ? "True" : "False", + (void *)grab -> window, grab -> ownerEvents ? "True" : "False", grab -> keyboardMode ? "asynchronous" : "synchronous"); /* @@ -4693,8 +4693,8 @@ void nxagentDumpInputDevicesState(void) { fprintf(stderr, "\nPassive grab state: \n\tdevice [%p]\n\towner events flag [%s]" "\n\tpointer grab mode [%s]\n\tkeyboard grab mode [%s]\n\tevent type [%d]" - "\n\tmodifiers [%x]\n\tbutton/key [%u]\n\tevent mask [%lx]", - grab -> device, grab -> ownerEvents ? "True" : "False", + "\n\tmodifiers [%x]\n\tbutton/key [%u]\n\tevent mask [%x]", + (void *)grab -> device, grab -> ownerEvents ? "True" : "False", grab -> pointerMode ? "asynchronous" : "synchronous", grab -> keyboardMode ? "asynchronous" : "synchronous", grab -> type, grab -> modifiersDetail.exact, @@ -4724,12 +4724,12 @@ void nxagentDumpInputDevicesState(void) } } - fprintf(stderr, "\nPointer device state: \n\tdevice [%p]\n\tlast grab time [%lu]" + fprintf(stderr, "\nPointer device state: \n\tdevice [%p]\n\tlast grab time [%u]" "\n\tfrozen [%s]\n\tstate [%s]\n\tother [%p]\n\tevent count [%d]" - "\n\tfrom passive grab [%s]\n\tactivating button [%d]", dev, + "\n\tfrom passive grab [%s]\n\tactivating button [%d]", (void *)dev, dev -> grabTime.milliseconds, dev -> sync.frozen ? "Yes" : "No", nxagentGrabStateToString(dev -> sync.state), - dev -> sync.other, dev -> sync.evcount, + (void *)dev -> sync.other, dev -> sync.evcount, dev -> fromPassiveGrab ? "Yes" : "No", dev -> activatingKey); @@ -4739,7 +4739,7 @@ void nxagentDumpInputDevicesState(void) { fprintf(stderr, "\nPointer grab state: \n\twindow pointer [%p]" "\n\towner events flag [%s]\n\tgrab mode [%s]", - grab -> window, grab -> ownerEvents ? "True" : "False", + (void *)grab -> window, grab -> ownerEvents ? "True" : "False", grab -> pointerMode ? "asynchronous" : "synchronous"); if (grab -> window != pWin) @@ -4754,8 +4754,8 @@ void nxagentDumpInputDevicesState(void) { fprintf(stderr, "\nPassive grab state: \n\tdevice [%p]\n\towner events flag [%s]" "\n\tpointer grab mode [%s]\n\tkeyboard grab mode [%s]\n\tevent type [%d]" - "\n\tmodifiers [%x]\n\tbutton/key [%u]\n\tevent mask [%lx]", - grab -> device, grab -> ownerEvents ? "True" : "False", + "\n\tmodifiers [%x]\n\tbutton/key [%u]\n\tevent mask [%x]", + (void *)grab -> device, grab -> ownerEvents ? "True" : "False", grab -> pointerMode ? "asynchronous" : "synchronous", grab -> keyboardMode ? "asynchronous" : "synchronous", grab -> type, grab -> modifiersDetail.exact, diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 5792a41c5..1c2cd42ac 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -309,7 +309,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio if (!(dispatchException & DE_TERMINATE)) dispatchException = 0; - while (!dispatchException) + while (!dispatchException) { if (*icheck[0] != *icheck[1]) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c index ee19c28d0..ea617aa4b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXxvdisp.c @@ -95,16 +95,20 @@ ProcXvDispatch(ClientPtr client) result = (XineramaXvPutVideo(client)); else #endif - result = (ProcXvPutVideo(client)); - break; + { + result = (ProcXvPutVideo(client)); + } + break; case xv_PutStill: #ifdef PANORAMIX if(!noPanoramiXExtension) result = (XineramaXvPutStill(client)); else #endif - result = (ProcXvPutStill(client)); - break; + { + result = (ProcXvPutStill(client)); + } + break; case xv_GetVideo: result = (ProcXvGetVideo(client)); break; case xv_GetStill: result = (ProcXvGetStill(client)); break; case xv_GrabPort: result = (ProcXvGrabPort(client)); break; @@ -117,16 +121,20 @@ ProcXvDispatch(ClientPtr client) result = (XineramaXvStopVideo(client)); else #endif + { result = (ProcXvStopVideo(client)); - break; + } + break; case xv_SetPortAttribute: #ifdef PANORAMIX if(!noPanoramiXExtension) result = (XineramaXvSetPortAttribute(client)); else #endif + { result = (ProcXvSetPortAttribute(client)); - break; + } + break; case xv_GetPortAttribute: result = (ProcXvGetPortAttribute(client)); break; case xv_QueryBestSize: result = (ProcXvQueryBestSize(client)); break; case xv_QueryPortAttributes: result = (ProcXvQueryPortAttributes(client)); break; @@ -136,8 +144,10 @@ ProcXvDispatch(ClientPtr client) result = (XineramaXvPutImage(client)); else #endif + { result = (ProcXvPutImage(client)); - break; + } + break; #ifdef MITSHM case xv_ShmPutImage: #ifdef PANORAMIX @@ -145,8 +155,10 @@ ProcXvDispatch(ClientPtr client) result = (XineramaXvShmPutImage(client)); else #endif + { result = (ProcXvShmPutImage(client)); - break; + } + break; #endif case xv_QueryImageAttributes: result = (ProcXvQueryImageAttributes(client)); break; case xv_ListImageFormats: result = (ProcXvListImageFormats(client)); break; |