Re: [hatari-devel] Warnings |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Warnings
- From: Vincent Rivière <vincent.riviere@xxxxxxxxxxx>
- Date: Sun, 4 Oct 2020 13:38:39 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=1gBAJN2oXMirdyJLQ/9dbed9S7mI6ZWiuvogpHKV2ms=; b=E0YGcbq70EveYMdznvlQmOGuQRffH7C7lotq7sxMdGYPptZiUhExB6wr8JvKnC8Z5g 1eyjTu1hc7GAzxrA014+1MwdXGS5QGtzJrT2McVS0OGafmdw0mObflg5asUHJv/6zPjD Da2ecbG9m+PSrkLsRWx+2nORXgDTPL1dtPfumguF17pEBypAfbFNcGXzlS5zFUgmg+gB aK6WDRaTbq11qTLZuX/mKG8AzXnqWBmHPpXUVPswlis+HqzAfxVho6ELUyavr12qzEzK O8REGgriu2OHGWINYQomRFhaunKjRR5Y9EpSDHt0T7Yb9mlV7BHI0GGnP+jdXN6uBHkh QwOw==
On 02/10/2020 at 23:05, Nicolas Pomarède wrote:
maybe -Wno-char-subscripts could be added to the cpu Makefile (as the
code comes from WinUAE, I'd rather not change it too much ourselves,
because it makes merging harder)
Sure -Wno-char-subscripts could be an option to silence the warnings. But
there could be real bugs with accented characters on platforms where the
char type is signed.
I see that Thomas has improved the situation.
Now there are only 2 problematic sources: build68k.c and readcpu.c. I assume
that those sources come from WinUAE, so the issue should be fixed there.
Thanks for this work.
--
Vincent Rivière
[ 0%] Building C object src/cpu/CMakeFiles/build68k.dir/build68k.c.o
In file included from /home/vincent/compil/hatari-HG-latest/src/cpu/compat.h:15,
from /home/vincent/compil/hatari-HG-latest/src/cpu/sysdeps.h:23,
from /home/vincent/compil/hatari-HG-latest/src/cpu/build68k.c:10:
/home/vincent/compil/hatari-HG-latest/src/cpu/build68k.c: In function ?main?:
/home/vincent/compil/hatari-HG-latest/src/cpu/build68k.c:314:18: warning: array subscript has type ?char? [-Wchar-subscripts]
314 | while (isspace(*opstrp))
| ^~~~~~~
/home/vincent/compil/hatari-HG-latest/src/cpu/build68k.c:319:18: warning: array subscript has type ?char? [-Wchar-subscripts]
319 | if (!isspace (*osendp))
| ^~~~~~~
/home/vincent/compil/hatari-HG-latest/src/cpu/build68k.c:331:19: warning: array subscript has type ?char? [-Wchar-subscripts]
331 | while (!isspace(*p++));
| ^~~~
[ 16%] Building C object src/cpu/CMakeFiles/UaeCpu.dir/readcpu.c.o
In file included from /home/vincent/compil/hatari-HG-latest/src/cpu/compat.h:15,
from /home/vincent/compil/hatari-HG-latest/src/cpu/sysdeps.h:23,
from /home/vincent/compil/hatari-HG-latest/src/cpu/readcpu.c:10:
/home/vincent/compil/hatari-HG-latest/src/cpu/readcpu.c: In function ?build_insn?:
/home/vincent/compil/hatari-HG-latest/src/cpu/readcpu.c:324:42: warning: array subscript has type ?char? [-Wchar-subscripts]
324 | while (opcstr[pos] && !_istspace(opcstr[pos])) {
| ~~~~~~^~~~~
/home/vincent/compil/hatari-HG-latest/src/cpu/readcpu.c:324:26: note: in expansion of macro ?_istspace?
324 | while (opcstr[pos] && !_istspace(opcstr[pos])) {
| ^~~~~~~~~
/home/vincent/compil/hatari-HG-latest/src/cpu/readcpu.c:360:41: warning: array subscript has type ?char? [-Wchar-subscripts]
360 | while (opcstr[pos] && _istspace(opcstr[pos]))
| ~~~~~~^~~~~
/home/vincent/compil/hatari-HG-latest/src/cpu/readcpu.c:360:25: note: in expansion of macro ?_istspace?
360 | while (opcstr[pos] && _istspace(opcstr[pos]))
| ^~~~~~~~~