gdkkeys-x11.c:842: warning: suggest parentheses
- From: Sven Neumann <sven gimp org>
- To: gtk-devel-list gnome org
- Subject: gdkkeys-x11.c:842: warning: suggest parentheses
- Date: 24 Feb 2002 18:18:08 +0100
Hi,
my compiler suggests the following change:
gdkkeys-x11.c: In function `gdk_keymap_translate_keyboard_state':
gdkkeys-x11.c:842: warning: suggest parentheses around comparison in operand of &
the offending line looks like this:
if (tmp_keyval == GDK_Tab && (tmp_modifiers & GDK_SHIFT_MASK == 0))
I don't think parentheses around the comparison would make this behave
as intended, instead it should probably be:
if (tmp_keyval == GDK_Tab && (tmp_modifiers & GDK_SHIFT_MASK) == 0)
Salut, Sven
Index: gdk/x11/gdkkeys-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkkeys-x11.c,v
retrieving revision 1.15
diff -u -p -r1.15 gdkkeys-x11.c
--- gdk/x11/gdkkeys-x11.c 2002/02/21 17:13:34 1.15
+++ gdk/x11/gdkkeys-x11.c 2002/02/24 17:17:04
@@ -839,7 +839,7 @@ gdk_keymap_translate_keyboard_state (Gdk
* However, <shift>Tab is not _consistently_ GDK_ISO_Left_Tab, so people
* can't bind to GDK_ISO_Left_Tab instead. So, we force consistency here.
*/
- if (tmp_keyval == GDK_Tab && (tmp_modifiers & GDK_SHIFT_MASK == 0))
+ if (tmp_keyval == GDK_Tab && (tmp_modifiers & GDK_SHIFT_MASK) == 0)
{
tmp_keyval = GDK_ISO_Left_Tab;
tmp_modifiers |= GDK_SHIFT_MASK;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]