diff options
author | Ran Benita <ran234@gmail.com> | 2014-01-11 16:40:42 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2014-01-11 17:01:39 +0200 |
commit | 31430670df468ee90e260e006e277074a2a9319f (patch) | |
tree | 3c0f98c38db97a48fe8747a173e7060ae729e883 /src/state.c | |
parent | 1d5ae2263a609700ca78de20bdbe07314c8ee636 (diff) | |
download | xorg-lib-libxkbcommon-31430670df468ee90e260e006e277074a2a9319f.tar.gz |
Fix some cppcheck warnings
Someone was nice enough to run this for us:
ftp://ftp.sunet.se/pub/Linux/distributions/Debian/debian/pool/main/libx/libxkbcommon/libxkbcommon_0.3.1.orig.tar.gz
[libxkbcommon-0.3.1/src/keymap.c:86]: (style) The scope of the variable 'j' can be reduced.
[libxkbcommon-0.3.1/src/keymap.c:87]: (style) The scope of the variable 'key' can be reduced.
[libxkbcommon-0.3.1/src/keysym-utf.c:843]: (style) The scope of the variable 'mid' can be reduced.
[libxkbcommon-0.3.1/src/state.c:992]: (style) The scope of the variable 'str' can be reduced.
[libxkbcommon-0.3.1/src/xkbcomp/action.c:467]: (style) The scope of the variable 'absolute' can be reduced.
[libxkbcommon-0.3.1/src/xkbcomp/rules.c:468]: (style) The scope of the variable 'consumed' can be reduced.
[libxkbcommon-0.3.1/src/xkbcomp/rules.c:862]: (style) The scope of the variable 'mlvo' can be reduced.
[libxkbcommon-0.3.1/src/xkbcomp/rules.c:863]: (style) The scope of the variable 'kccgst' can be reduced.
[libxkbcommon-0.3.1/src/xkbcomp/rules.c:865]: (style) The scope of the variable 'match_type' can be reduced.
[libxkbcommon-0.3.1/src/xkbcomp/symbols.c:753]: (style) The scope of the variable 'toAct' can be reduced.
[libxkbcommon-0.3.1/src/xkbcomp/symbols.c:1573]: (style) The scope of the variable 'key' can be reduced.
[libxkbcommon-0.3.1/test/common.c:80]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.
[libxkbcommon-0.3.1/test/interactive.c:358]: (style) The scope of the variable 'nevs' can be reduced.
[libxkbcommon-0.3.1/test/interactive.c:236]: (style) Checking if unsigned variable 'nsyms' is less than zero.
[libxkbcommon-0.3.1/test/interactive.c:226]: (style) Unused variable: unicode
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/state.c')
-rw-r--r-- | src/state.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c index e13d1fd..768d47c 100644 --- a/src/state.c +++ b/src/state.c @@ -1002,13 +1002,12 @@ xkb_state_mod_names_are_active(struct xkb_state *state, { va_list ap; xkb_mod_index_t idx = 0; - const char *str; xkb_mod_mask_t wanted = 0; int ret = 0; va_start(ap, match); while (1) { - str = va_arg(ap, const char *); + const char *str = va_arg(ap, const char *); if (str == NULL) break; idx = xkb_keymap_mod_get_index(state->keymap, str); |