summaryrefslogtreecommitdiffstats
path: root/x11vnc/keyboard.c
diff options
context:
space:
mode:
authorrunge <runge>2006-01-11 15:01:12 +0000
committerrunge <runge>2006-01-11 15:01:12 +0000
commit57cf0cdab5480efebaf447d5675e51b0d311ceee (patch)
treecb4b1419712454d31e85bd8558ff67b2d8fdac90 /x11vnc/keyboard.c
parent0b7a0030acc27377b01e3afa41f672dc4d6a7561 (diff)
downloadlibtdevnc-57cf0cdab5480efebaf447d5675e51b0d311ceee.tar.gz
libtdevnc-57cf0cdab5480efebaf447d5675e51b0d311ceee.zip
x11vnc: close fd > 2 in run_user_command(), -nocmds in crash_debug, fix 64bit bug for -solid.
Diffstat (limited to 'x11vnc/keyboard.c')
-rw-r--r--x11vnc/keyboard.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/x11vnc/keyboard.c b/x11vnc/keyboard.c
index 1fba4c9..8542785 100644
--- a/x11vnc/keyboard.c
+++ b/x11vnc/keyboard.c
@@ -751,7 +751,7 @@ int sloppy_key_check(int key, rfbBool down, rfbKeySym keysym, int *new) {
}
if (!down && !keycode_state[key] && !IsModifierKey(keysym)) {
- int i, cnt = 0, downkey;
+ int i, cnt = 0, downkey = -1;
int nmods_down = track_mod_state(NoSymbol, FALSE, FALSE);
int mods_down[256];
@@ -1156,7 +1156,7 @@ xkbmodifiers[] For the KeySym bound to this (keycode,group,level) store
for (grp = 0; grp < GRP; grp++) {
for (lvl = 0; lvl < LVL; lvl++) {
unsigned int ms, mods;
- int state_save = -1, mods_save;
+ int state_save = -1, mods_save = -1;
KeySym ks2;
/* look up the Keysym, if any */
@@ -1398,13 +1398,13 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym,
int kc, grp, lvl, i, kci;
int kc_f[0x100], grp_f[0x100], lvl_f[0x100], state_f[0x100], found;
int ignore_f[0x100];
- unsigned int state;
+ unsigned int state = 0;
/* these are used for finding modifiers, etc */
XkbStateRec kbstate;
int got_kbstate = 0;
- int Kc_f, Grp_f, Lvl_f;
+ int Kc_f, Grp_f = 0, Lvl_f = 0;
static int Kc_last_down = -1;
static KeySym Ks_last_down = NoSymbol;
@@ -1544,7 +1544,7 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym,
if (found > 1) {
if (down) {
int l, score[0x100];
- int best, best_score = -1;
+ int best = 0, best_score = -1;
/* need to break the tie... */
if (! got_kbstate) {
XkbGetState(dpy, XkbUseCoreKbd, &kbstate);