Re: [hatari-devel] New compiler warnings

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


Am Sun, 6 May 2018 18:08:48 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi Thomas,
> 
> I'm getting new compiler warnings:
> 
> src/gemdos.c: In function ‘GemDOS_LoadAndReloc’:
> src/gemdos.c:4006:17: warning: comparison between signed and unsigned 
> integer expressions [-Wsign-compare]
>    if (nRelTabIdx > nFileSize - 3)
>                   ^
> src/gemdos.c:4021:20: warning: comparison between signed and unsigned 
> integer expressions [-Wsign-compare]
>    while (nRelTabIdx < nFileSize && prg[nRelTabIdx])
>                      ^
> src/gemdos.c:4035:17: warning: comparison between signed and unsigned 
> integer expressions [-Wsign-compare]
>    if (nRelTabIdx >= nFileSize)
>                   ^~

Strange, I don't get these with neither GCC 8, nor clang 6. Could you
please try whether they are all gone when you change the type of
nRelTabIdx "from uint32_t" to "long" ?

 Thomas



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