[PATCH 13/14] xfree86/os-support: Mark some variables as unused.

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


Keep on setting them (since the strtok() calls have side-effects), but
mark them as unused, since they aren't used afterwards (except in dead
code which should probably go away).

Those warnings go away accordingly:
|   CC     lnx_acpi.lo
| lnx_acpi.c: In function 'lnxACPIGetEventFromOs':
| lnx_acpi.c:78:8: warning: variable 'GFX' set but not used [-Wunused-but-set-variable]
| lnx_acpi.c:77:8: warning: variable 'video' set but not used [-Wunused-but-set-variable]

Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 hw/xfree86/os-support/linux/lnx_acpi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/os-support/linux/lnx_acpi.c b/hw/xfree86/os-support/linux/lnx_acpi.c
index 5fad194..b90cb19 100644
--- a/hw/xfree86/os-support/linux/lnx_acpi.c
+++ b/hw/xfree86/os-support/linux/lnx_acpi.c
@@ -74,8 +74,8 @@ lnxACPIGetEventFromOs(int fd, pmEvent *events, int num)
     
     /* Check that we have a video event */
     if (!strncmp(ev, "video", 5)) {
-	char *video = NULL;
-	char *GFX = NULL;
+	_X_UNUSED char *video = NULL;
+	_X_UNUSED char *GFX = NULL;
 	char *notify = NULL;
 	char *data = NULL; /* doesn't appear to be used in the kernel */
 	unsigned long int notify_l, data_l;
-- 
1.7.5.1



More information about the xorg-devel mailing list