Mercurial > pidgin.yaz
changeset 18057:23b03396e71e
Eliminate warnings about array subscripts being char. They can be signed,
so we need to cast to unsigned char.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 07 Jun 2007 03:13:02 +0000 |
parents | 6f7f54765822 |
children | 4ca97b26a8fb |
files | finch/libgnt/gntkeys.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/libgnt/gntkeys.c Thu Jun 07 03:11:56 2007 +0000 +++ b/finch/libgnt/gntkeys.c Thu Jun 07 03:13:02 2007 +0000 @@ -206,8 +206,8 @@ node->flags |= IS_END; return; } - while (*path && node->next[*path]) { - node = node->next[*path]; + while (*path && node->next[(unsigned char)*path]) { + node = node->next[(unsigned char)*path]; node->ref++; path++; } @@ -215,7 +215,7 @@ return; n = g_new0(struct _node, 1); n->ref = 1; - node->next[*path++] = n; + node->next[(unsigned char)*path++] = n; add_path(n, path); } @@ -230,13 +230,13 @@ if (!*path) return; - next = node->next[*path]; + next = node->next[(unsigned char)*path]; if (!next) return; del_path(next, path + 1); next->ref--; if (next->ref == 0) { - node->next[*path] = NULL; + node->next[(unsigned char)*path] = NULL; g_free(next); } } @@ -252,12 +252,12 @@ struct _node *n = &root; root.flags &= ~IS_END; - while (*path && n->next[*path] && !(n->flags & IS_END)) { + while (*path && n->next[(unsigned char)*path] && !(n->flags & IS_END)) { if (!g_ascii_isspace(*path) && !g_ascii_iscntrl(*path) && !g_ascii_isgraph(*path)) return 0; - n = n->next[*path++]; + n = n->next[(unsigned char)*path++]; depth++; }