[hatari-devel] Compilation Warnings

Eero Tamminen eerot at users.berlios.de
Mon May 23 21:58:01 CEST 2011


Hi,

On sunnuntai 22 toukokuu 2011, Laurent Sallafranque wrote:
> I've compiled the latest source.
> 
> I get the following warnings :
> 
> [ 24%] Building C object src/debug/CMakeFiles/Debug.dir/debugui.c.o
> /home/laurent/Atari/hatari/src/debug/debugui.c: In function
> ‘DebugUI_SetOptions’:
> /home/laurent/Atari/hatari/src/debug/debugui.c:344:2: warning: new
> qualifiers in middle of multi-level non-const cast are unsafe
> 
> [ 71%] Building C object src/CMakeFiles/hatari.dir/main.c.o
> /home/laurent/Atari/hatari/src/main.c: In function ‘main’:
> /home/laurent/Atari/hatari/src/main.c:739:2: warning: new qualifiers in
> middle of multi-level non-const cast are unsafe

This is hopefully fixed by the patch I just commited (tested by Nicolas).


> [ 30%] Building C object src/debug/CMakeFiles/Debug.dir/68kDisass.c.o
> /home/laurent/Atari/hatari/src/debug/68kDisass.c: In function
> ‘Disass68k_loop’:
> /home/laurent/Atari/hatari/src/debug/68kDisass.c:2373:15: warning: array
> subscript is above array bounds

The comment on that line claims that the warning is harmless:
                dbuf[len++] = ' ';              /* Will give harmless 
warning from GCC */


> [ 80%] Building C object src/CMakeFiles/hatari.dir/stMemory.c.o
> /home/laurent/Atari/hatari/src/stMemory.c: In function
> ‘STMemory_SafeCopy’: /home/laurent/Atari/hatari/src/stMemory.c:67:2:
> warning: format ‘%i’ expects type ‘int’, but argument 5 has type
> ‘size_t’

Hopefully[1] fixed by another patch I commited...


	- Eero

[1] I have GCC 4.4.5 & Clang 1.1 (LLVM 2.7) and don't get these warnings...



More information about the hatari-devel mailing list