[gtk-vnc] Avoid comparing display to self in gdk stubs
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Avoid comparing display to self in gdk stubs
- Date: Fri, 22 Jul 2016 17:40:33 +0000 (UTC)
commit 62c1f50c017391f55211282ef6c015049e752f98
Author: Daniel P. Berrange <berrange redhat com>
Date: Thu Jul 21 10:55:08 2016 +0100
Avoid comparing display to self in gdk stubs
Latest gcc warns about the comparison 'dpy == dpy'
vncdisplaykeymap.c: In function 'vnc_display_keymap_gdk2rfb_table':
vncdisplaykeymap.c:165:14: error: self-comparison always evaluates to true [-Werror=tautological-compare]
if (GDK_IS_X11_DISPLAY(dpy)) {
^~
Change to using 'dpy != NULL' to avoid this.
Signed-off-by: Daniel P. Berrange <berrange redhat com>
src/vncdisplaykeymap.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/vncdisplaykeymap.c b/src/vncdisplaykeymap.c
index 4ed058d..efdf44a 100644
--- a/src/vncdisplaykeymap.c
+++ b/src/vncdisplaykeymap.c
@@ -86,7 +86,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
/* Gtk2 compat */
#ifndef GDK_IS_X11_DISPLAY
-#define GDK_IS_X11_DISPLAY(dpy) (dpy == dpy)
+#define GDK_IS_X11_DISPLAY(dpy) (dpy != NULL)
#endif
#endif
@@ -96,7 +96,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
/* Gtk2 compat */
#ifndef GDK_IS_WIN32_DISPLAY
-#define GDK_IS_WIN32_DISPLAY(dpy) (dpy == dpy)
+#define GDK_IS_WIN32_DISPLAY(dpy) (dpy != NULL)
#endif
#endif
@@ -106,7 +106,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
/* Gtk2 compat */
#ifndef GDK_IS_BROADWAY_DISPLAY
-#define GDK_IS_BROADWAY_DISPLAY(dpy) (dpy == dpy)
+#define GDK_IS_BROADWAY_DISPLAY(dpy) (dpy != NULL)
#endif
#endif
@@ -117,7 +117,7 @@ static unsigned int ref_count_for_untranslated_keys = 0;
/* Gtk2 compat */
#ifndef GDK_IS_QUARTZ_DISPLAY
-#define GDK_IS_QUARTZ_DISPLAY(dpy) (dpy == dpy)
+#define GDK_IS_QUARTZ_DISPLAY(dpy) (dpy != NULL)
#endif
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]