diff -uprk.orig xxkb-1.10.orig/resource.c xxkb-1.10/resource.c --- xxkb-1.10.orig/resource.c 2002-11-30 16:34:12 +0300 +++ xxkb-1.10/resource.c 2005-01-17 02:34:02 +0300 @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +87,8 @@ const char *AppName = "XXkb"; const char *Yes = "yes"; const char *No = "no"; +static void load_image(Display *dpy, char *name, XImage **pixmap); + void ParseConfig(db, class, prefix, name, type, def_val, value) XrmDatabase db; char *class, *prefix, *name, *def_val; @@ -366,7 +369,7 @@ void err_malloc() #include -int load_image(dpy, name, pixmap) +static void load_image(dpy, name, pixmap) Display *dpy; char * name; XImage **pixmap; @@ -384,6 +387,7 @@ XImage **pixmap; printf("No memory for open xpm file: %s\n", name); break; default: + ; } } diff -uprk.orig xxkb-1.10.orig/wlist.c xxkb-1.10/wlist.c --- xxkb-1.10.orig/wlist.c 1999-05-22 15:35:45 +0400 +++ xxkb-1.10/wlist.c 2005-01-17 02:32:03 +0300 @@ -1,6 +1,11 @@ #include +#include +#include +#include #include "wlist.h" +static WInfo *winlist = NULL, *last = NULL; + extern Display *dpy; WInfo* win_find(w) diff -uprk.orig xxkb-1.10.orig/wlist.h xxkb-1.10/wlist.h --- xxkb-1.10.orig/wlist.h 2003-03-19 15:34:45 +0300 +++ xxkb-1.10/wlist.h 2005-01-17 02:32:03 +0300 @@ -13,8 +13,6 @@ typedef struct _WInfo { int ignore; } WInfo; -static WInfo *winlist = NULL, *last = NULL; - WInfo* win_find(Window w); WInfo* button_find(Window button); WInfo* win_add(Window w, kbdState *state); diff -uprk.orig xxkb-1.10.orig/xxkb.c xxkb-1.10/xxkb.c --- xxkb-1.10.orig/xxkb.c 2003-03-19 15:56:06 +0300 +++ xxkb-1.10/xxkb.c 2005-01-17 02:32:03 +0300 @@ -7,6 +7,7 @@ #include #include +#include #include "wlist.h" #include "xxkb.h" @@ -41,7 +42,7 @@ static ListAction FindAppList(Window w) int main (int argc, char ** argv) { - int xkbEventType, xkbError, reason_rtrn, mjr, mnr; + int xkbEventType, xkbError, reason_rtrn; Bool fout_flag = False; Geometry geom; Atom protocols[1]; @@ -56,9 +57,6 @@ int main (int argc, char ** argv) case XkbOD_BadServerVersion : printf("xxkb was compiled with XKB version %d.%02d\n", XkbMajorVersion,XkbMinorVersion); - printf("But %s uses incompatibl eversion %d.%02d\n", - reason_rtrn == XkbOD_BadLibraryVersion ? "Xlib" : "Xserver", - mjr,mnr); break; case XkbOD_ConnectionRefused : printf("Connection refused\n"); @@ -381,7 +379,7 @@ int main (int argc, char ** argv) win = ev.core.xproperty.window; tmp_info = win_find(win); if (!tmp_info) { - Window rwin, parent, *childrens, *child, app; int num; + Window rwin, parent, *childrens; int num; XQueryTree(dpy, win, &rwin, &parent, &childrens, &num); AddWindow(win, parent); } @@ -568,7 +566,7 @@ Window win, *core; static Bool Compare(char *pattern, char *str) { - char *i = pattern, *j = str, *sub, *lpos; + char *i = pattern, *j = str, *sub = 0, *lpos = 0; Bool aster = False; do { @@ -738,8 +736,6 @@ void AddAppToConfig(Window appwin, unsig MatchType type; switch (state & (ControlMask | ShiftMask)) { - case 0: - return; case ControlMask : type = WMClassClass; break; @@ -748,6 +744,9 @@ void AddAppToConfig(Window appwin, unsig break; case ControlMask | ShiftMask: type = WMClassName; + case 0: + default: + return; } if ((name = GetAppIdent(appwin, type)) != NULL) {