[PATCH v2 07/10] xfixes: Mark some variables as unused.

Cyril Brulebois kibi at debian.org
Thu Jun 2 18:00:42 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]

Disgusted-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
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 01eb70d..ecbed40 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -196,8 +196,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;
     ConstrainCursorHarderProcPtr constrain_proc;
 
     Unwrap (cs, pScreen, CloseScreen, close_proc);
-- 
1.7.5.3



More information about the xorg-devel mailing list