Following patches fix errors reported by static analizer. I did run quick test that xkbcomp generates same output with and without patches for a keymap. I'm working on porting these patches to xserver/xkb. Pauli