[PATCH 09/14] xfixes: Mark some variables as unused.

Cyril Brulebois kibi at debian.org
Tue May 24 09:41:13 PDT 2011


Calling Unwrap() is just a way of performing an assignment while keeping a
backup of the original value. In the CursorCloseScreen function, the backup
value doesn't seem to be useful, but Unwrap() is used anyway (probably to stay
in line with other functions). As a consequence, mark those variables as unused.

The following warnings go away accordingly:
|   CC     cursor.lo
| cursor.c: In function 'CursorCloseScreen':
| cursor.c:186:26: warning: variable 'display_proc' set but not used [-Wunused-but-set-variable]
| cursor.c:185:24: warning: variable 'close_proc' set but not used [-Wunused-but-set-variable]

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 xfixes/cursor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index fb608f6..0d42f9e 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -182,8 +182,8 @@ CursorCloseScreen (int index, ScreenPtr pScreen)
 {
     CursorScreenPtr	cs = GetCursorScreen (pScreen);
     Bool		ret;
-    CloseScreenProcPtr	close_proc;
-    DisplayCursorProcPtr display_proc;
+    _X_UNUSED CloseScreenProcPtr	close_proc;
+    _X_UNUSED DisplayCursorProcPtr	display_proc;
 
     Unwrap (cs, pScreen, CloseScreen, close_proc);
     Unwrap (cs, pScreen, DisplayCursor, display_proc);
-- 
1.7.5.1



More information about the xorg-devel mailing list