[hatari-devel] Cmake warnings

Thomas Huth huth at users.berlios.de
Mon Jan 18 23:00:59 CET 2010


On Mon, 18 Jan 2010 22:48:40 +0100
Laurent Sallafranque <laurent.sallafranque at free.fr> wrote:

> I've compiled the latest Hatari version with cmake;make
> 
> I've got the following warnings :
> 
> [ 3%] Building C object src/falcon/CMakeFiles/Falcon.dir/dsp_cpu.c.o
> /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c: In function 
> ‘dsp_jsset_pp’:
> /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c:890: warning: array 
> subscript is above array bounds
> /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c: In function 
> ‘dsp_jsclr_pp’:
> /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c:890: warning: array 
> subscript is above array bounds
> /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c: In function
> ‘dsp_btst_pp’: /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c:890:
> warning: array subscript is above array bounds
> /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c: In function
> ‘dsp_jset_pp’: /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c:890:
> warning: array subscript is above array bounds
> /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c: In function
> ‘dsp_jclr_pp’: /home/laurent/Atari/hatari/src/falcon/dsp_cpu.c:890:
> warning: array subscript is above array bounds
> 
> [ 30%] Building C object src/debug/CMakeFiles/Debug.dir/symbols.c.o
> /home/laurent/Atari/hatari/src/debug/symbols.c: In function 
> ‘Symbols_Command’:
> /home/laurent/Atari/hatari/src/debug/symbols.c:451: warning:
> ‘maxaddr’ may be used uninitialized in this function
> 
> [ 53%] Building C object src/CMakeFiles/hatari.dir/control.c.o
> /home/laurent/Atari/hatari/src/control.c: In function
> ‘Control_SetSocket’: /home/laurent/Atari/hatari/src/control.c:438:
> warning: passing argument 2 of ‘connect’ from incompatible pointer
> type /usr/include/sys/socket.h:129: note: expected ‘const struct
> sockaddr *’ but argument is of type ‘struct sockaddr_un *’
> 
> 
> I don't understand where the problem is in dsp code.

The warnings might occur now since Hatari is compiled with -O3 instead
of -O2 when using CMake. The latest GCC then often spill out some more
warnings. However, in case of dsp_cpu.c, I think they are wrong, sounds
like a mistake of GCC there.

 Thomas



More information about the hatari-devel mailing list