Re: [hatari-devel] Warnings

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Am Sun, 4 Oct 2020 13:38:39 +0200
schrieb Vincent Rivière <vincent.riviere@xxxxxxxxxxx>:

> 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.

Yes, these two files are from WinUAE ... but at least in readcpu.c it's
getting kind of ugly, since this is not using "char" but "TCHAR", which
is a special type on Windows AFAIK, so simply casting to "unsigned
char" is not appropriate there. I think it's likely best if we simply
turn of the char-subscripts warnings for the WinUAE CPU core code, but
keep it for the rest of Hatari. The CPU core code only deals with a
well-known set of plain ASCII files, so there should never be a
character with the value >= 128 in there, thus it should be ok to
ignore the warnings here.

 Thomas


PS: I'm currently experimenting with Cygwin builds on cirrus-ci.com,
and I can reproduce the compiler warnings there ... I'll add a
regression test job to our .cirrus-ci.yml once I've got it in a proper
shape.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/