Re: [hatari-devel] New compiler warnings

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


Hi,

On 05/06/2018 10:55 PM, Thomas Huth wrote:
Am Sun, 6 May 2018 18:08:48 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
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" ?

Yes, they're gone and there are no new ones.

I have GCC v6.3.


	- Eero




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