[Home]

Summary:ASTERISK-02075: Patch to clean many warnings in compilation of chan_h323
Reporter:lvazquez (lvazquez)Labels:
Date Opened:2004-07-21 10:51:52Date Closed:2004-09-25 02:37:47
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-chan_h323-210704_clean_warnings.patch
Description:Compiling asterisk (make) gives those warnings:
gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i686   -DZAPTEL_OPTIMIZATIONS  -DASTERISK_VERSION=\"CVS-HEAD-07/19/04-15:22:39\" -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      -Wno-missing-prototypes -Wno-missing-declarations   -DZAPATA_PRI   -DIAX_TRUNKING   -DLINUX -DCRYPTO -fPIC    -c -o chan_h323.o chan_h323.c
chan_h323.c: In function `create_connection':
chan_h323.c:1027: warning: assignment discards qualifiers from pointer target type
chan_h323.c: In function `cleanup_call_details':
chan_h323.c:1298: warning: passing arg 1 of `free' discards qualifiers from pointer target type
chan_h323.c:1301: warning: passing arg 1 of `free' discards qualifiers from pointer target type
chan_h323.c:1304: warning: passing arg 1 of `free' discards qualifiers from pointer target type
chan_h323.c:1307: warning: passing arg 1 of `free' discards qualifiers from pointer target type
chan_h323.c:1310: warning: passing arg 1 of `free' discards qualifiers from pointer target type
chan_h323.c:1313: warning: passing arg 1 of `free' discards qualifiers from pointer target type
chan_h323.c:1316: warning: passing arg 1 of `free' discards qualifiers from pointer target type
chan_h323.c: In function `oh323_set_rtp_peer':
chan_h323.c:1900: warning: passing arg 2 of `h323_native_bridge' discards qualifiers from pointer target type

This patch fix these ugly ;) warnings mostly related with const modifier handling

****** ADDITIONAL INFORMATION ******

Try this an look, the warnings are gone.
This includes a const modifier in the addr pointer field at
rtp_info and wipping out some strange const modifiers in the casting of pointers in many calls to free() in chan_h323.c
Also changing the prototipe of h323_native_bridge setting to const the second argument.
Comments:By: jerjer (jerjer) 2004-07-22 00:19:29

fixed properly? in cvs.