Re: [hatari-devel] New compiler warnings |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] New compiler warnings
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 6 May 2018 21:55:31 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1525636540; bh=N+U+Y3SN9Amb928/1WzadB+d9FPuLoTGGJdv/GYMcTw=; h=Date:From:To:Subject:From; b=YGLbGJkq9F58/tdUlGz+YwocAoUwjM68o9GAGuB/USZ+35bHTbZzRFEkFbNifmvUk npt1BZxHj4nIOOBAGPLx6XWeWOPbi1equPKEbSmYK9gs1K2cKsb9+t7+GxfEHXpFRl sjotrl5Yefml1v+nOdA4DBN5MmzLFyvFFjOpQuDEyKZLFsC2TchM8bUNbarlW/OLNu lYork56bsUbghN9CiXmI5p/SjAr9ALRG3bVYbYJbXj3JsCqHDdxX2ZdIryXAK+bMLN aFOLKlt4gt8RAp/7SqrM5FgDtX0/b20GtweWrlPjBm64Wvg/k6LsdtW8zU62o+VXpT pdY/UnLjwPx1A==
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