From 5bbdbfce2ef7d153dba7c888edf49021bcbe3914 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 18 Mar 2016 16:05:01 +0100 Subject: hw/nxagent/Clipboard.c: The result variable is only needed when combiled with -DDEBUG. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends the following compiler warning: ``` Clipboard.c: In function ‘nxagentRequestSelection’: Clipboard.c:272:7: warning: variable ‘result’ set but not used [-Wunused-but-set-variable] int result; ^ ``` --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 10606a24f..82a1ed77e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -269,7 +269,9 @@ void nxagentClearSelection(XEvent *X) void nxagentRequestSelection(XEvent *X) { + #ifdef DEBUG int result; + #endif int i = 0; XSelectionEvent eventSelection; @@ -311,7 +313,7 @@ FIXME: Do we need this? if (X->xselectionrequest.target == serverTARGETS) { Atom xa_STRING = XA_STRING; - result = XChangeProperty (nxagentDisplay, + XChangeProperty (nxagentDisplay, X->xselectionrequest.requestor, X->xselectionrequest.property, XInternAtom(nxagentDisplay, "ATOM", 0), @@ -329,7 +331,7 @@ FIXME: Do we need this? if (i < NumCurrentSelections) { - result = XChangeProperty(nxagentDisplay, + XChangeProperty(nxagentDisplay, X->xselectionrequest.requestor, X->xselectionrequest.property, X->xselectionrequest.target, @@ -349,7 +351,10 @@ FIXME: Do we need this? eventSelection.target = X->xselectionrequest.target; eventSelection.time = X->xselectionrequest.time; - result = XSendEvent(nxagentDisplay, + #ifdef DEBUG + result = + #endif + XSendEvent(nxagentDisplay, eventSelection.requestor, False, 0L, @@ -463,7 +468,10 @@ FIXME: Do we need this? eventSelection.property = None; eventSelection.time = X->xselectionrequest.time; - result = XSendEvent(nxagentDisplay, + #ifdef DEBUG + result = + #endif + XSendEvent(nxagentDisplay, eventSelection.requestor, False, 0L, -- cgit v1.2.3