Subject: lamip snapshot 20060109 warnings


Author: rafal_glazar, 2006-01-11 05:37:37
When I try to compile lamip snapshot 20060109 with gcc 4.0.2 i've got this warnings

gcc -o lamip -std=c89 -O2 -pipe -Wall -Werror -x c -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Xlinker --version-script=lamip.defs -Xlinker --export-dynamic -ldl -lpthread -L/usr/lib -I. -I../include -D_GNU_SOURCE -DLAMIP_INSTALL_DIR=\"/usr\" -DLAMIP_PLUGIN_DIR=\"/usr/lib/lamip\" -DLAMIP_WITH_FILE -DLAMIP_WITH_CURL -DLAMIP_WITH_CDROM -DLAMIP_CRYPTO_ZLIB -DLAMIP_CRYPTO_BZ2 -lz -lbz2 `curl-config --libs` main.c subsystems.c utilities.c util_playlist.c util_songinfo.c util_songinfo_taglib.c util_url.c plugins.c util_plugins.c util_plugins_handle.c util_plugins_cfg.c cfg.c event.c signals.c playthread.c controls.c util_control_input.c util_control_output.c util_control_dsp.c -DLAMIP_WITH_TAGLIB -ltag_c
cc1: warnings being treated as errors
util_url.c: In function 'lamip_url_getMetadata':
util_url.c:459: warning: the address of 'index', will always evaluate as 'true'
util_url.c: In function 'bzlib_read':
util_url.c:1030: warning: pointer targets in assignment differ in signedness
cc1: warnings being treated as errors
util_control_output.c: In function '_op_setup_buffer_len':
util_control_output.c:157: warning: 'sampleSize' may be used uninitialized in this function

Replies


Author: ciberfred, 2006-01-11 18:22:02
well let's fix it :)

also try to compil plugins wav and mp3 if i need to fix it also for gcc4

thanks for your help.

Author: rafal_glazar, 2006-01-12 04:09:57
Those are warnings in plugin mp3

gcc -DPACKAGE_NAME=\"libmp3\" -DPACKAGE_TARNAME=\"libmp3\" -DPACKAGE_VERSION=\"0.0.4\" "-DPACKAGE_STRING=\"libmp3 0.0.4\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libmp3\" -DVERSION=\"0.0.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -Wall -I/usr/include/lamip -Wall -I/usr/include/lamip -MT libmp3.lo -MD -MP -MF .deps/libmp3.Tpo -c libmp3.c -fPIC -DPIC -o .libs/libmp3.o
libmp3.c: In function 'lamip_input_info':
libmp3.c:93: warning: assignment from incompatible pointer type
libmp3.c:95: warning: assignment from incompatible pointer type
libmp3.c: In function 'ID3v2_length':
libmp3.c:241: warning: pointer targets in passing argument 1 of 'strncasecmp' differ in signedness
libmp3.c: In function 'parse_apev2':
libmp3.c:619: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
libmp3.c:622: warning: pointer targets in passing argument 1 of 'strcasecmp' differ in signedness
libmp3.c:623: warning: pointer targets in passing argument 1 of 'strcasecmp' differ in signedness
libmp3.c:631: warning: pointer targets in passing argument 1 of 'strcasecmp' differ in signedness
libmp3.c:632: warning: pointer targets in passing argument 1 of 'strcasecmp' differ in signedness
libmp3.c:640: warning: pointer targets in passing argument 1 of 'strcasecmp' differ in signedness
libmp3.c:648: warning: pointer targets in passing argument 1 of 'strcasecmp' differ in signedness
libmp3.c:649: warning: pointer targets in passing argument 1 of 'strcasecmp' differ in signedness

and those are warnings from plugin wav

gcc -DPACKAGE_NAME=\"libwav\" -DPACKAGE_TARNAME=\"libwav\" -DPACKAGE_VERSION=\"0.0.4\" "-DPACKAGE_STRING=\"libwav 0.0.4\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libwav\" -DVERSION=\"0.0.4\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -Wall -I/usr/include/lamip -Wall -I/usr/include/lamip -MT libwav.lo -MD -MP -MF .deps/libwav.Tpo -c libwav.c -fPIC -DPIC -o .libs/libwav.o
libwav.c: In function 'lamip_input_info':
libwav.c:81: warning: assignment from incompatible pointer type
libwav.c:83: warning: assignment from incompatible pointer type

and those are from plugin alsa

gcc -DPACKAGE_NAME=\"libalsa\" -DPACKAGE_TARNAME=\"libalsa\" -DPACKAGE_VERSION=\"0.0.3\" "-DPACKAGE_STRING=\"libalsa 0.0.3\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"libalsa\" -DVERSION=\"0.0.3\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -I. -I. -Wall -I/usr/include/lamip -Wall -I/usr/include/lamip -MT libalsa.lo -MD -MP -MF .deps/libalsa.Tpo -c libalsa.c -fPIC -DPIC -o .libs/libalsa.o
libalsa.c: In function 'lamip_output_info':
libalsa.c:41: warning: assignment from incompatible pointer type
libalsa.c:43: warning: assignment from incompatible pointer type
libalsa.c:45: warning: assignment from incompatible pointer type
libalsa.c: In function 'alsa_open':
libalsa.c:224: warning: pointer targets in passing argument 2 of 'snd_pcm_hw_params_get_buffer_time_max' differ in signedness
libalsa.c:238: warning: pointer targets in passing argument 3 of 'snd_pcm_hw_params_set_period_time_near' differ in signedness
libalsa.c:249: warning: pointer targets in passing argument 3 of 'snd_pcm_hw_params_set_buffer_time_near' differ in signedness

They all are just warnings but maybe you want your code super-strict.

Author: rafal_glazar, 2006-01-17 04:46:22
Well, another one in snapshot 20060116:

gcc -o lamip -std=c89 -O2 -pipe -Wall -Werror -x c -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Xlinker --version-script=lamip.defs -Xlinker --export-dynamic -ldl -lpthread -L/usr/lib -I. -I../include -D_GNU_SOURCE -DLAMIP_INSTALL_DIR=\"/usr\" -DLAMIP_PLUGIN_DIR=\"/usr/lib/lamip\" -DLAMIP_WITH_FILE -DLAMIP_WITH_CURL -DLAMIP_WITH_CDROM -DLAMIP_CRYPTO_ZLIB -DLAMIP_CRYPTO_BZ2 -lz -lbz2 `curl-config --libs` main.c subsystems.c utilities.c util_playlist.c util_songinfo.c util_songinfo_taglib.c util_url.c plugins.c util_plugins.c util_plugins_handle.c util_plugins_cfg.c cfg.c event.c signals.c playthread.c controls.c util_control_input.c util_control_output.c util_control_dsp.c -DLAMIP_WITH_TAGLIB -ltag_c
cc1: warnings being treated as errors
util_url.c: In function 'bzlib_read':
util_url.c:1075: warning: pointer targets in assignment differ in signedness

Author: ciberfred, 2006-01-17 23:20:44
should be fixed by casting like this :
[...]
bzhd->bzlib_state.next_in = (char*)(lurl->buffer);
[...]

but the bzlib part seems contain a bug because the begining of each file could not be decoded correctly by the lib. (try a small wav file compressed into a .bz2 and you will see)

Reply

Name : Email :