diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-14 17:23:52 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-14 17:32:18 +0200 |
commit | 561ae8b0803f2ff1d09345c204c2973c44dba25d (patch) | |
tree | 51a6b445a75e5f4ddef284213283d090628d68ff /vcl | |
parent | b35dd680122cd71ee7ff0d828a5e484a63b62e2c (diff) |
-Werror=logical-op (GCC 6)
...where NoSymbol is apparently defined as zero in X11/X.h (though the X11 docs
at <http://www.x.org/releases/X11R7.7/doc/libX11/libX11/libX11.html> are silent
about that), even though XKeysymToKeycode is specified to return zero, not
NoSymbol, if "the specified KeySym is not defined" (<http://www.x.org/releases/
11R7.7/doc/libX11/libX11/libX11.html#id2813072>); lets assume NoSymbol /is/
zero, and static_assert that assumption
Change-Id: Ib3db59373fb084fcd936e0c7be1b76be994e261f
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 1b02601215e9..09c23a04fcc4 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -737,7 +737,8 @@ OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const // return an empty string for keysyms that are not bound to // any key code KeyCode aKeyCode = XKeysymToKeycode( GetDisplay(), nKeySym ); - if( aKeyCode != 0 && aKeyCode != NoSymbol ) + static_assert(NoSymbol == 0, "X11 inconsistency"); + if( aKeyCode != NoSymbol ) { if( !nKeySym ) aRet = "???"; |