Message ID | 4E79AA0F.1000500@amd.com |
---|---|
State | New |
Headers | show |
On Wed, Sep 21, 2011 at 11:10:39AM +0200, Christoph Egger wrote: > > Fix "warning: array subscript has type 'char' " on NetBSD. > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> This proves that macros are the most powerful programming tool because they can be used to fix problems caused by macros in the first place! :) Thanks, applied to the trivial patches tree: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches Stefan
diff --git a/cmd.c b/cmd.c index ecca167..f77897e 100644 --- a/cmd.c +++ b/cmd.c @@ -389,7 +389,7 @@ cvtnum( if (sp[1] != '\0') return -1LL; - c = tolower(*sp); + c = qemu_tolower(*sp); switch (c) { default: return i; diff --git a/ui/keymaps.c b/ui/keymaps.c index 78c7ea3..0545d49 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -146,7 +146,7 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table, if (rest && strstr(rest, "addupper")) { char *c; for (c = line; *c; c++) - *c = toupper(*c); + *c = qemu_toupper(*c); keysym = get_keysym(table, line); if (keysym)
Fix "warning: array subscript has type 'char' " on NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> add_keysym(line, keysym, keycode | SCANCODE_SHIFT, k);