[gtk-vnc] Fix warning about unused 'dpy' variable in keymap code



commit 8224ac513d5c72052645477387466cd76649ecb6
Author: Daniel P. Berrange <berrange redhat com>
Date:   Fri Jan 28 11:53:31 2011 +0000

    Fix warning about unused 'dpy' variable in keymap code
    
    In GTK2 paths, GDK_IS_*_DISPLAY(dpy) evaluated to '1'
    which meant 'dpy' could be unused. Change it to eval
    to 'dpy == dpy' to trick compiler into thinking the
    variable is in use.
    
    * src/vncdisplaykeymap.c: Fix warning of unused variable

 src/vncdisplaykeymap.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/vncdisplaykeymap.c b/src/vncdisplaykeymap.c
index 0ab9bc1..f94852f 100644
--- a/src/vncdisplaykeymap.c
+++ b/src/vncdisplaykeymap.c
@@ -71,7 +71,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
 
 /* Gtk2 compat */
 #ifndef GDK_IS_X11_DISPLAY
-#define GDK_IS_X11_DISPLAY(dpy) 1
+#define GDK_IS_X11_DISPLAY(dpy) (dpy == dpy)
 #endif
 #endif
 
@@ -81,7 +81,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
 
 /* Gtk2 compat */
 #ifndef GDK_IS_WIN32_DISPLAY
-#define GDK_IS_WIN32_DISPLAY(dpy) 1
+#define GDK_IS_WIN32_DISPLAY(dpy) (dpy == dpy)
 #endif
 #endif
 
@@ -91,7 +91,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
 
 /* Gtk2 compat */
 #ifndef GDK_IS_QUARTZ_DISPLAY
-#define GDK_IS_QUARTZ_DISPLAY(dpy) 1
+#define GDK_IS_QUARTZ_DISPLAY(dpy) (dpy == dpy)
 #endif
 #endif
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]