[Home]

Summary:ASTERISK-03847: Compile warnings
Reporter:Olle Johansson (oej)Labels:
Date Opened:2005-04-03 14:38:51Date Closed:2008-01-15 15:30:35.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Compile warnings that I can't fix, but logged during compilation with my new fresh GCC 3.4 :-)

If someone knows how to fix them, please add patches. Thank you!

This is on FreeBSD 4.10
Comments:By: Olle Johansson (oej) 2005-04-03 14:39:03

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../inc
lude -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i386  -D_THREAD_SAFE    -DASTERISK_VER
SION=\"CVS-HEAD-04/03/05-21:36:47\" -DASTERISK_VERSION_NUM=999999 -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/
etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"
/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc
/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi
-bin\"     -DBUSYDETECT_MARTIN     -fomit-frame-pointer    -c -o ast_expr.o ast_expr.c
ast_expr.y:28:1: warning: "QUAD_MIN" redefined
In file included from /usr/include/limits.h:94,
                from /usr/local/lib/gcc/i386-portbld-freebsd4.10/3.4.4/include/limits.h:122,
                from /usr/local/lib/gcc/i386-portbld-freebsd4.10/3.4.4/include/syslimits.h:7,
                from /usr/local/lib/gcc/i386-portbld-freebsd4.10/3.4.4/include/limits.h:11,
                from ast_expr.y:23:
/usr/include/machine/limits.h:99:1: warning: this is the location of the previous definition
ast_expr.y:31:1: warning: "QUAD_MAX" redefined
/usr/include/machine/limits.h:98:1: warning: this is the location of the previous definition

By: Olle Johansson (oej) 2005-04-03 14:40:23

gcc -g  -o asterisk -Wl,-E  io.o sched.o logger.o frame.o loader.o config.o channel.o translate.o file.
o say.o pbx.o cli.o md5.o term.o ulaw.o alaw.o callerid.o fskmodem.o image.o app.o cdr.o tdd.o acl.o rt
p.o manager.o asterisk.o ast_expr.o dsp.o chanvars.o indications.o autoservice.o db.o privacy.o astmm.o
enum.o srv.o dns.o aescrypt.o aestab.o aeskey.o utils.o config_old.o plc.o jitterbuf.o editline/libedi
t.a db1-ast/libdb1.a stdtime/libtime.a -lc_r -lncurses -lm -lcrypto -lssl
/usr/lib/libc.so: WARNING!  setkey(3) not present in the system!
/usr/lib/libc.so: warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so: warning: mktemp() possibly used unsafely; consider using mkstemp()
/usr/lib/libc.so: WARNING!  des_setkey(3) not present in the system!
/usr/lib/libc.so: WARNING!  encrypt(3) not present in the system!
/usr/lib/libc.so: warning: tmpnam() possibly used unsafely; consider using mkstemp()
/usr/lib/libc.so: warning: this program uses f_prealloc(), which is not recommended.
/usr/lib/libc.so: WARNING!  des_cipher(3) not present in the system!
/usr/lib/libc.so: warning: tempnam() possibly used unsafely; consider using mkstemp()

By: Olle Johansson (oej) 2005-04-03 14:41:52

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../include -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i386  -D_THREAD_SAFE    -DASTERISK_VERSION=\"CVS-HEAD-04/03/05-21:36:47\" -DASTERISK_VERSION_NUM=999999 -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi-bin\"     -DBUSYDETECT_MARTIN     -fomit-frame-pointer  -DNO_AST_MM -I/usr/local/include -L/usr/local/lib   -c -o astman.o astman.c
astman.c: In function `get_user_input':
astman.c:439: warning: passing arg 5 of `newtEntry' from incompatible pointer type
astman.c: In function `login':
astman.c:606: warning: passing arg 5 of `newtEntry' from incompatible pointer type
astman.c:607: warning: passing arg 5 of `newtEntry' from incompatible pointer type

By: Olle Johansson (oej) 2005-04-03 14:42:28

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../inc
lude -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i386  -D_THREAD_SAFE    -DASTERISK_VER
SION=\"CVS-HEAD-04/03/05-21:35:46\" -DASTERISK_VERSION_NUM=999999 -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/
etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"
/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc
/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi
-bin\"     -DBUSYDETECT_MARTIN     -fomit-frame-pointer    -c -o localtime.o localtime.c
localtime.c: In function `gmtsub':
localtime.c:1096: warning: assignment discards qualifiers from pointer target type

By: Olle Johansson (oej) 2005-04-03 14:43:37

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../inc
lude -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i386  -D_THREAD_SAFE    -DASTERISK_VER
SION=\"CVS-HEAD-04/03/05-21:36:02\" -DASTERISK_VERSION_NUM=999999 -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/
etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"
/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc
/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi
-bin\"     -DBUSYDETECT_MARTIN     -fomit-frame-pointer    -c -o channel.o channel.c
channel.c: In function `ast_read':
channel.c:1302: warning: unused variable `prestate'

By: Olle Johansson (oej) 2005-04-03 14:44:26

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../inc
lude -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i386  -D_THREAD_SAFE    -DASTERISK_VER
SION=\"CVS-HEAD-04/03/05-21:36:47\" -DASTERISK_VERSION_NUM=999999 -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/
etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"
/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc
/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi
-bin\"     -DBUSYDETECT_MARTIN     -fomit-frame-pointer    -c -o jitterbuf.o jitterbuf.c
jitterbuf.c:400: warning: 'jb_dbginfo' defined but not used
jitterbuf.c:106: warning: 'longcmp' defined but not used

By: Olle Johansson (oej) 2005-04-03 14:45:01

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../inc
lude -I/usr/local/include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i386  -D_THREAD_SAFE    -DASTERISK_VER
SION=\"CVS-HEAD-04/03/05-21:36:47\" -DASTERISK_VERSION_NUM=999999 -DINSTALL_PREFIX=\"\" -DASTETCDIR=\"/
etc/asterisk\" -DASTLIBDIR=\"/usr/lib/asterisk\" -DASTVARLIBDIR=\"/var/lib/asterisk\" -DASTVARRUNDIR=\"
/var/run\" -DASTSPOOLDIR=\"/var/spool/asterisk\" -DASTLOGDIR=\"/var/log/asterisk\" -DASTCONFPATH=\"/etc
/asterisk/asterisk.conf\" -DASTMODDIR=\"/usr/lib/asterisk/modules\" -DASTAGIDIR=\"/var/lib/asterisk/agi
-bin\"     -DBUSYDETECT_MARTIN     -fomit-frame-pointer  -Wno-missing-prototypes -Wno-missing-declarati
ons  -DOLD_SANGOMA_API       -DCRYPTO -fPIC    -c -o chan_iax2.o chan_iax2.c
chan_iax2.c: In function `iax2_show_firmware':
chan_iax2.c:4151: warning: int format, u_long arg (arg 5)
chan_iax2.c: At top level:
chan_iax2.c:1399: warning: 'do_deliver' defined but not used

By: Kevin P. Fleming (kpfleming) 2005-04-03 16:22:03

ast_expr.y: fixed
linker warnings: not fixable in Asterisk, appear to be related to OpenSSL
astman.c: fixed
localtime.c: cannot reproduce, will need to see the definition of 'struct tm' on your system
channel.c: bogus warning, this variable is used on line 1331
jitterbuf.c: fixed
chan_iax2.c: fixed (amazingly, FreeBSD appears to define ntohl() to actually return a long <G>)

By: Kevin P. Fleming (kpfleming) 2005-04-03 18:31:08

Committed a fix for the localtime.c problem as well, the remaining ones are not fixable in Asterisk. Thanks for the report!

By: Russell Bryant (russell) 2005-04-05 01:06:43

added the same fix to 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:30:12.000-0600

Repository: asterisk
Revision: 5367

U   trunk/ast_expr.y
U   trunk/channels/chan_iax2.c
U   trunk/jitterbuf.c
U   trunk/utils/astman.c

------------------------------------------------------------------------
r5367 | kpfleming | 2008-01-15 15:30:12 -0600 (Tue, 15 Jan 2008) | 2 lines

fix various compiler warnings (bug ASTERISK-3847)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5367

By: Digium Subversion (svnbot) 2008-01-15 15:30:18.000-0600

Repository: asterisk
Revision: 5374

U   trunk/stdtime/localtime.c

------------------------------------------------------------------------
r5374 | kpfleming | 2008-01-15 15:30:18 -0600 (Tue, 15 Jan 2008) | 2 lines

one more FreeBSD compile warning fix (bug ASTERISK-3847)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5374

By: Digium Subversion (svnbot) 2008-01-15 15:30:35.000-0600

Repository: asterisk
Revision: 5393

U   branches/v1-0/stdtime/localtime.c

------------------------------------------------------------------------
r5393 | russell | 2008-01-15 15:30:35 -0600 (Tue, 15 Jan 2008) | 2 lines

FreeBSD compile warning (bug ASTERISK-3847)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5393