From 30cd3a6c24b2097c30fa2f81c9908aff174e0980 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 21 Mar 2016 16:31:49 +0100 Subject: hw/nxagent/Display.c: Don't declare and assign packMethod / packQuality if not used later on. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends the following compiler warnings: ``` Display.c: In function ‘nxagentReconnectDisplay’: Display.c:2449:19: warning: variable ‘packQuality’ set but not used [-Wunused-but-set-variable] int packMethod, packQuality; ^ Display.c:2449:7: warning: variable ‘packMethod’ set but not used [-Wunused-but-set-variable] int packMethod, packQuality; ^ ``` --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index abc6a9380..5586e82cd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -2446,7 +2446,6 @@ Bool nxagentReconnectDisplay(void *p0) { int i; int flexibility = *(int*)p0; - int packMethod, packQuality; #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_DISPLAY_DEBUG) fprintf(stderr, "nxagentReconnectDisplay\n"); @@ -2464,9 +2463,6 @@ Bool nxagentReconnectDisplay(void *p0) * Reset the values to their defaults. */ - packMethod = nxagentPackMethod; - packQuality = nxagentPackQuality; - nxagentPackMethod = -1; nxagentPackQuality = -1; nxagentSplitThreshold = -1; -- cgit v1.2.3 From a0e5589edf49f6f43631ce4ee7458e2dce4994e5 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 3 May 2016 19:28:48 +0200 Subject: hw/nxagent/Display.c: Define Pixmap from XlibPixmap before including Icons.h (which includes hw/nxagent/X11/include/xpm_nxagent.h). --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 5586e82cd..960b8a1ad 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -62,7 +62,11 @@ is" without express or implied warranty. #include "Init.h" #include "Args.h" #include "Image.h" + +#define Pixmap XlibPixmap #include "Icons.h" +#undef Pixmap + #include "Render.h" #include "Font.h" #include "Reconnect.h" -- cgit v1.2.3 From 52dc49607e244c0e39b5d7cbdb8b41755f078aac Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 3 May 2016 19:42:46 +0200 Subject: hw/nxagent/Display.c: Avoid incompatible pointer type. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends the following compiler warning Display.c: In function ‘nxagentMakeIcon’: Display.c:1949:18: warning: assignment from incompatible pointer type agentIconData=x2goagentIconData; ^ Display.c:1954:18: warning: assignment from incompatible pointer type agentIconData=nxagentIconData; ^ Display.c:2001:41: warning: passing argument 3 of ‘XpmCreatePixmapFromData’ from incompatible pointer type agentIconData, ^ In file included from Icons.h:22:0, from Display.c:67: X11/include/xpm_nxagent.h:242:6: note: expected ‘char **’ but argument is of type ‘char *’ FUNC(XpmCreatePixmapFromData, int, (Display *display, ^ X11/include/xpm_nxagent.h:230:32: note: in definition of macro ‘FUNC’ #define FUNC(f, t, p) extern t f p --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 960b8a1ad..628c4c495 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -1938,7 +1938,7 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask) XlibPixmap IconPixmap; XlibPixmap IconShape; char* agent_icon_name; - char* agentIconData; + char** agentIconData; /* * selecting x2go icon when running as X2Go agent -- cgit v1.2.3