|
From: | Richard Henderson |
Subject: | Re: [Qemu-ppc] [PATCH for-2.10] Use qemu_tolower() and qemu_toupper(), not tolower() and toupper() |
Date: | Thu, 20 Jul 2017 08:26:29 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/20/2017 06:31 AM, Peter Maydell wrote:
gdbstub.c:914:13: warning: array subscript has type 'char' This reflects the fact that toupper() and tolower() give undefined behaviour if they are passed a value that isn't a valid 'unsigned char' or EOF.
Not saying we shouldn't use qemu_tolower etc, but this statement is not true at all. Officially, the argument to toupper and tolower is type int.
This sounds like a bug in NetBSD -- though it may not even be that, as they may have done something clever and put the symbol in the middle of the data. A trick that worked before compiler warnings got smarter.
Anyway, should we poison the iso name so this doesn't creep in again? Reviewed-by: Richard Henderson <address@hidden> r~
[Prev in Thread] | Current Thread | [Next in Thread] |