diff options
author | Brendan Cully <brendan@kublai.com> | 2011-05-22 22:13:45 -0700 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2011-05-22 22:13:45 -0700 |
commit | 75202d4d8676ec86d7f90ed1ee714f2d06259a06 (patch) | |
tree | 9ada697d6b84fe81d25bbdc8b0b7b2901fa53461 /keymap.c | |
parent | c3b93333a7646113115b7e0a7981b658983816f1 (diff) |
Fix some minor warnings
Diffstat (limited to 'keymap.c')
-rw-r--r-- | keymap.c | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -167,16 +167,17 @@ static int parse_fkey(char *s) */ static int parse_keycode (const char *s) { - const char *endChar; - long int result = strtol(s+1, &endChar, 8); - /* allow trailing whitespace, eg. < 1001 > */ - while (ISSPACE(*endChar)) - ++endChar; - /* negative keycodes don't make sense, also detect overflow */ - if (*endChar != '>' || result < 0 || result == LONG_MAX) { - return -1; - } - return result; + char *endChar; + long int result = strtol(s+1, &endChar, 8); + /* allow trailing whitespace, eg. < 1001 > */ + while (ISSPACE(*endChar)) + ++endChar; + /* negative keycodes don't make sense, also detect overflow */ + if (*endChar != '>' || result < 0 || result == LONG_MAX) { + return -1; + } + + return result; } static int parsekeys (const char *str, keycode_t *d, int max) @@ -689,7 +690,7 @@ void init_extended_keys(void) if (keyname) { - char *s = tigetstr(keyname); + char *s = tigetstr((char *)keyname); if (s && (long)(s) != -1) { int code = key_defined(s); |