[PATCH xserver 1/4] Don't declare variables which will be unused if XSERVER_LIBPICACCESS isn't defined

Jon Turney jon.turney at dronecode.org.uk
Tue Apr 18 10:53:04 UTC 2017


../hw/xfree86/common/xf86Config.c: In function ‘xf86HandleConfigFile’:
../hw/xfree86/common/xf86Config.c:2278:10: warning: unused variable ‘singlecard’ [-Wunused-variable]
../hw/xfree86/common/xf86Config.c:2277:17: warning: unused variable ‘scanptr’ [-Wunused-variable]

Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
---
 hw/xfree86/common/xf86Config.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index c2b522a..ca80d5e 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2274,8 +2274,10 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout)
 ConfigStatus
 xf86HandleConfigFile(Bool autoconfig)
 {
+#ifdef XSERVER_LIBPCIACCESS
     const char *scanptr;
     Bool singlecard = 0;
+#endif
     Bool implicit_layout = FALSE;
     XF86ConfLayoutPtr layout;
 
-- 
2.8.3



More information about the xorg-devel mailing list