From 3bdcd172757a10aeaeceff4447a62f7513804893 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 2 May 2016 11:29:53 +0200 Subject: hw/nxagent/NX*.c: Amend re-introduced nxagent warnings by fixing the corresponding code section in files included from "somewhere" in nx-X11/programs/Xserver/. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (1) In file included from NXrender.c:44:0: ../../mi/../render/render.c: In function ‘swapStops’: ../../mi/../render/render.c:2541:13: warning: variable ‘colors’ set but not used [-Wunused-but-set-variable] CARD16 *colors; ^ (2) In file included from NXevents.c:133:0: ../../dix/events.c: In function ‘ReinitializeRootWindow’: ../../dix/events.c:2046:15: warning: unused variable ‘pScreen’ [-Wunused-variable] ScreenPtr pScreen = win->drawable.pScreen; ^ ../../dix/events.c: In function ‘XineramaPointInWindowIsVisible’: ../../dix/events.c:2177:15: warning: variable ‘pScreen’ set but not used [-Wunused-but-set-variable] ScreenPtr pScreen = pWin->drawable.pScreen; ^ In file included from NXevents.c:133:0: ../../dix/events.c: In function ‘XineramaPointInWindowIsVisible’: ../../dix/events.c:2191:2: error: ‘pScreen’ undeclared (first use in this function) pScreen = pWin->drawable.pScreen; ^ (3) In file included from NXdixfonts.c:77:0: ../../dix/dixfonts.c: In function ‘GetFontPath’: ../../dix/dixfonts.c:1890:2: warning: return makes pointer from integer without a cast return BadAlloc; ^ --- nx-X11/programs/Xserver/dix/dixfonts.c | 2 +- nx-X11/programs/Xserver/render/render.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'nx-X11/programs/Xserver') diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index c9d64c7b0..58e562411 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -1884,7 +1884,7 @@ GetFontPath(int *count, int *length) if (c == NULL) { free(font_path_string); font_path_string = NULL; - return BadAlloc; + return NULL; } font_path_string = c; diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c index 3c14ac0e7..c73ff8305 100644 --- a/nx-X11/programs/Xserver/render/render.c +++ b/nx-X11/programs/Xserver/render/render.c @@ -2538,13 +2538,11 @@ static void swapStops(void *stuff, int num) { int i, n; CARD32 *stops; - CARD16 *colors; stops = (CARD32 *)(stuff); for (i = 0; i < num; ++i) { swapl(stops, n); ++stops; } - colors = (CARD16 *)(stops); for (i = 0; i < 4*num; ++i) { swaps(stops, n); ++stops; -- cgit v1.2.3