All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] use qemu_* ctype functions
@ 2011-09-21  9:10 Christoph Egger
  2011-09-21 10:18 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Egger @ 2011-09-21  9:10 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]


Fix "warning: array subscript has type 'char' " on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

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)
                             add_keysym(line, keysym, keycode | 
SCANCODE_SHIFT, k);


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: qemu_ctype.diff --]
[-- Type: text/plain, Size: 694 bytes --]

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)
 			    add_keysym(line, keysym, keycode | SCANCODE_SHIFT, k);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-21 10:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21  9:10 [Qemu-devel] [PATCH] use qemu_* ctype functions Christoph Egger
2011-09-21 10:18 ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.