Index: src/actions.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/actions.c,v retrieving revision 1.260 diff -u -r1.260 actions.c --- src/actions.c 3 Jan 2006 21:34:20 -0000 1.260 +++ src/actions.c 13 Jan 2006 09:24:31 -0000 @@ -451,7 +451,7 @@ } rp_action* -find_keybinding (KeySym keysym, int state, rp_keymap *map) +find_keybinding (KeySym keysym, unsigned int state, rp_keymap *map) { int i; for (i = 0; i < map->actions_last; i++) @@ -532,7 +532,7 @@ } static int -remove_keybinding (KeySym keysym, int state, rp_keymap *map) +remove_keybinding (KeySym keysym, unsigned int state, rp_keymap *map) { int i; int found = -1; @@ -1348,7 +1348,7 @@ } static char * -frame_selector (int n) +frame_selector (unsigned int n) { if (n < strlen (defaults.frame_selectors)) { @@ -1364,7 +1364,7 @@ static int frame_selector_match (char ch) { - int i; + size_t i; /* Is it in the frame selector string? */ for (i=0; i= '0' && ch <= '9' - && ch - '0' >= strlen (defaults.frame_selectors)) + && (size_t)(ch - '0') >= strlen (defaults.frame_selectors)) { return ch - '0'; } Index: src/actions.h =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/actions.h,v retrieving revision 1.84 diff -u -r1.84 actions.h --- src/actions.h 20 Oct 2005 06:21:44 -0000 1.84 +++ src/actions.h 13 Jan 2006 09:24:31 -0000 @@ -215,7 +215,7 @@ void keymap_free (rp_keymap *map); void free_aliases (); void free_keymaps (); -rp_action* find_keybinding (KeySym keysym, int state, rp_keymap *map); +rp_action* find_keybinding (KeySym keysym, unsigned int state, rp_keymap *map); rp_action* find_keybinding_by_action (char *action, rp_keymap *map); Index: src/bar.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/bar.c,v retrieving revision 1.51 diff -u -r1.51 bar.c --- src/bar.c 9 Dec 2004 05:18:11 -0000 1.51 +++ src/bar.c 13 Jan 2006 09:24:31 -0000 @@ -227,8 +227,8 @@ static int max_line_length (char* msg) { - int i; - int start; + size_t i; + size_t start; int ret = 0; /* Count each line and keep the length of the longest one. */ @@ -300,7 +300,7 @@ static void draw_string (rp_screen *s, char *msg) { - int i; + size_t i; int line_no; int start; int line_height = FONT_HEIGHT (defaults.font); @@ -384,7 +384,7 @@ } static void -get_mark_box (char *msg, int mark_start, int mark_end, +get_mark_box (char *msg, size_t mark_start, size_t mark_end, int *x, int *y, int *width, int *height) { int start, end; Index: src/frame.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/frame.c,v retrieving revision 1.15 diff -u -r1.15 frame.c --- src/frame.c 17 Jan 2005 23:26:05 -0000 1.15 +++ src/frame.c 13 Jan 2006 09:24:31 -0000 @@ -233,8 +233,16 @@ read_slot(w); else if (!strcmp(tmp, ":last-access")) read_slot(f->last_access); - else if (!strcmp(tmp, ":dedicated")) - read_slot(f->dedicated); + else if (!strcmp(tmp, ":dedicated")) { + /* f->dedicated is unsigned, so read into local variable */ + long dedicated; + + read_slot(dedicated); + if (dedicated <= 0) + f->dedicated = 0; + else if (f->dedicated >= 1) + f->dedicated = 1; + } else if (!strcmp(tmp, ")")) break; else @@ -260,10 +268,6 @@ f->height = defaults.window_border_width*2 + 1; if (f->last_access < 0) f->last_access = 0; - if (f->dedicated < 0) - f->dedicated = 0; - else if (f->dedicated > 1) - f->dedicated = 1; /* Find the window with the X11 window ID. */ win = find_window_in_list (w, &rp_mapped_window); Index: src/main.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/main.c,v retrieving revision 1.118 diff -u -r1.118 main.c --- src/main.c 3 Jan 2006 21:34:21 -0000 1.118 +++ src/main.c 13 Jan 2006 09:24:31 -0000 @@ -321,7 +321,7 @@ size_t n = 256; char *partial; char *line; - int linesize = n; + size_t linesize = n; partial = (char*)xmalloc(n); line = (char*)xmalloc(linesize); Index: src/screen.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/screen.c,v retrieving revision 1.11 diff -u -r1.11 screen.c --- src/screen.c 20 Oct 2005 06:21:44 -0000 1.11 +++ src/screen.c 13 Jan 2006 09:24:31 -0000 @@ -163,7 +163,7 @@ /* Return 1 if w is a root window of any of the screens. */ int -is_a_root_window (int w) +is_a_root_window (unsigned int w) { int i; for (i=0; iframes_numset = rp_frame_numset; Index: src/screen.h =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/screen.h,v retrieving revision 1.11 diff -u -r1.11 screen.h --- src/screen.h 20 Oct 2005 06:21:44 -0000 1.11 +++ src/screen.h 13 Jan 2006 09:24:31 -0000 @@ -38,7 +38,7 @@ void init_screens (int screen_arg, int screen_num); int is_rp_window_for_screen (Window w, rp_screen *s); -int is_a_root_window (int w); +int is_a_root_window (unsigned int w); char *screen_dump (rp_screen *screen); Index: src/window.c =================================================================== RCS file: /cvsroot/ratpoison/ratpoison/src/window.c,v retrieving revision 1.33 diff -u -r1.33 window.c --- src/window.c 5 Jan 2006 04:36:07 -0000 1.33 +++ src/window.c 13 Jan 2006 09:24:31 -0000 @@ -19,6 +19,7 @@ * Boston, MA 02111-1307 USA */ +#define _XOPEN_SOURCE 500 #include /* for getsid */ #include #include @@ -715,7 +716,7 @@ */ static int -isdigit (ch) +isdigit (int ch) { return ch >= '0' && ch <= '9'; }