From: Philipp T. <pt...@su...> - 2003-01-30 17:58:48
|
While compiling allegro 4.1.9 (upgrading our package for the next version of SuSE Linux) on the x86-64 (aka AMD Hammer) platform, I got a bunch of warnings which I thought might be intertesting for you. I haven't checked all warnings, but at least the code in cmp_tab and cmp_shift_tab does seem to assume that sizeof(pointer) == sizeof(int). For ISO C99, the right way would be to include inttypes.h and use intptr_t, if that's not available, size_t should be used. I've also included the warnings on mixing signed and unsigned types in comparisons as these too should be checked whether signed or unsigned comparisons are wanted in the specific case. BTW, if there's interest, I have patches available that makes allegro require autoconf 2.52 and get rid of acconfig.h by either using AH_TEMPLATE or the third argument to AC_DEFINE. BTW2, misc/allegro.spec needs a bit cleaning up. docs/makedoc.c has moved and explicitely stating things like libc.so.6(GLIBC_2.0) is plain wrong as these are determined by 'AutoReqProv: on'. The list of warnings is: + make gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -fPIC -DALLEGRO_SHARED -c ./src/datafile.c -o obj/unix/shared/alleg/datafile.o src/datafile.c: In function `initialise_bitmap': src/datafile.c:1977: warning: cast from pointer to integer of different size src/datafile.c: In function `initialise_datafile': src/datafile.c:2016: warning: cast from pointer to integer of different size gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -fPIC -DALLEGRO_SHARED -c ./src/gui.c -o obj/unix/shared/alleg/gui.o src/gui.c: In function `cmp_tab': src/gui.c:505: warning: cast from pointer to integer of different size src/gui.c:505: warning: cast from pointer to integer of different size src/gui.c: In function `cmp_shift_tab': src/gui.c:520: warning: cast from pointer to integer of different size src/gui.c:520: warning: cast from pointer to integer of different size gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -fPIC -DALLEGRO_SHARED -c ./src/c/cgfx15.c -o obj/unix/shared/alleg/cgfx15.o src/c/cgfx.h: In function `_linear_hline15': src/c/cgfx.h:178: warning: signed and unsigned type in conditional expression src/c/cgfx.h:196: warning: signed and unsigned type in conditional expression src/c/cgfx.h:211: warning: signed and unsigned type in conditional expression gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -fPIC -DALLEGRO_SHARED -c ./src/x/xwin.c -o obj/unix/shared/alleg/xwin.o src/x/xwin.c: In function `_xwin_private_process_event': src/x/xwin.c:2181: warning: comparison between signed and unsigned gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -fPIC -DALLEGRO_SHARED -c ./src/linux/lconsole.c -o obj/unix/shared/alleg/lconsole.o src/linux/lconsole.c: In function `__al_linux_done_console': src/linux/lconsole.c:248: warning: comparison between signed and unsigned gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -fPIC -DALLEGRO_SHARED -c ./src/linux/lmseev.c -o obj/unix/shared/alleg/lmseev.o src/linux/lmseev.c: In function `processor': src/linux/lmseev.c:415: warning: comparison between signed and unsigned src/linux/lmseev.c: In function `analyse_data': src/linux/lmseev.c:459: warning: comparison between signed and unsigned gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -fPIC -DALLEGRO_SHARED -c ./src/linux/lsystem.c -o obj/unix/shared/alleg/lsystem.o src/linux/lsystem.c: In function `sys_linux_message': src/linux/lsystem.c:294: warning: comparison between signed and unsigned gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -fPIC -DALLEGRO_SHARED -DALLEGRO_MODULE -c ./src/linux/fbcon.c -o obj/unix/module/fbcon.o src/linux/fbcon.c: In function `fb_init': src/linux/fbcon.c:162: warning: comparison between signed and unsigned src/linux/fbcon.c:162: warning: signed and unsigned type in conditional expression src/linux/fbcon.c:175: warning: comparison between signed and unsigned src/linux/fbcon.c:175: warning: comparison between signed and unsigned src/linux/fbcon.c: In function `fb_vsync': src/linux/fbcon.c:528: warning: comparison between signed and unsigned src/linux/fbcon.c: In function `fb_set_palette': src/linux/fbcon.c:573: warning: comparison between signed and unsigned gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -c ./setup/setup.c -o obj/unix/setup.o setup/setup.c:1357: warning: comparison between signed and unsigned setup/setup.c:1369: warning: comparison between signed and unsigned setup/setup.c:1372: warning: comparison between signed and unsigned setup/setup.c: In function `setup_param_dialog': setup/setup.c:2204: warning: cast from pointer to integer of different size gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -c ./tools/plugins/datitype.c -o obj/unix/alleg/datitype.o tools/plugins/datitype.c: In function `changetype': tools/plugins/datitype.c:110: warning: cast from pointer to integer of different size tools/plugins/datitype.c: In function `changedepth': tools/plugins/datitype.c:201: warning: cast from pointer to integer of different size gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -c ./tools/grabber.c -o obj/unix/grabber.o tools/grabber.c: In function `new_object': tools/grabber.c:2939: warning: cast from pointer to integer of different size tools/grabber.c: In function `_mangled_main': tools/grabber.c:3441: warning: cast to pointer from integer of different size gcc -DHAVE_CONFIG_H -Iinclude -Iinclude/allegro -I./include -I./include/allegro -I. -I/usr/X11R6/include -I/opt/kde3/include/artsc -pipe -O2 -funroll-loops -ffast-math -fomit-frame-pointer -Wall -O2 -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter -DALLEGRO_USE_C -DALLEGRO_LIB_BUILD -c docs/src/makedoc/makehtml.c -o obj/unix/makehtml.o docs/src/makedoc/makehtml.c: In function `_output_toc': docs/src/makedoc/makehtml.c:538: warning: cast from pointer to integer of different size docs/src/makedoc/makehtml.c:538: warning: cast from pointer to integer of different size docs/src/makedoc/makehtml.c: In function `_output_section_heading': docs/src/makedoc/makehtml.c:706: warning: cast from pointer to integer of different size docs/src/makedoc/makehtml.c:706: warning: cast from pointer to integer of different size -- Philipp Thomas <pt...@su...> SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany |