[Home]

Summary:ASTERISK-00231: Correct most compile warnings
Reporter:Thorsten Lockert (tholo)Labels:
Date Opened:2003-09-06 17:29:41Date Closed:2008-01-15 14:34:03.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) a.diff
Description:The attached patch attempts to correct most compile warnings on OpenBSD, without affecting build on Linux.

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

Mostly this involves adding some casts (don't assume time_t == long, but cast it to long for %ld in printf, don't assume pthread_t is a numeric type, but cast -1 / -2 to pthread_t when assigning / checking against that), as well as adding or rearranging order of #include statements.
Comments:By: John Todd (jtodd) 2003-09-08 03:52:43

This is great.  I assume from prior notes that this is for -current and will not work on 3.3?  Doesn't matter; if I can get * running on any version of OpenBSD, I'll upgrade my machines early.  However, it might be worth noting that here in the bugnote if that is indeed the case (I got some undefined symbol errors in enum.c and srv.c that prevented a clean compile on 3.3)

By: Thorsten Lockert (tholo) 2003-09-08 10:13:25

It should work with pre-ELF OpenBSD installs -- I haven't actually built it on the latest ELF versions yet.  I do know that there were some bugs in the OpenBSD ELF implementation that were fixed in -current only a couple of weeks ago, so it *should* work with it.  But I have not yet gotten around to testing that.

However, you do need the patch in ASTERISK-229 to build -- this one (ASTERISK-231) is optional and only kill compile warnings.  ASTERISK-229 fix actual build errors...

By: Mark Spencer (markster) 2003-09-08 11:47:08

Fixed in CVS

By: Digium Subversion (svnbot) 2008-01-15 14:34:03.000-0600

Repository: asterisk
Revision: 1486

U   trunk/agi/eagi-sphinx-test.c
U   trunk/apps/app_agi.c
U   trunk/apps/app_mp3.c
U   trunk/apps/app_queue.c
U   trunk/apps/app_voicemail.c
U   trunk/apps/app_voicemail2.c
U   trunk/asterisk.c
U   trunk/autoservice.c
U   trunk/cdr/cdr_mysql.c
U   trunk/channel.c
U   trunk/channels/chan_agent.c
U   trunk/channels/chan_iax2.c
U   trunk/channels/chan_mgcp.c
U   trunk/channels/chan_modem.c
U   trunk/channels/chan_sip.c
U   trunk/formats/format_g729.c
U   trunk/formats/format_gsm.c
U   trunk/formats/format_h263.c
U   trunk/formats/format_jpeg.c
U   trunk/formats/format_mp3.c
U   trunk/formats/format_pcm.c
U   trunk/formats/format_pcm_alaw.c
U   trunk/formats/format_vox.c
U   trunk/formats/format_wav.c
U   trunk/formats/format_wav_gsm.c
U   trunk/include/asterisk/channel.h
U   trunk/include/asterisk/srv.h
U   trunk/loader.c
U   trunk/logger.c
U   trunk/manager.c
U   trunk/pbx/pbx_gtkconsole.c
U   trunk/pbx/pbx_spool.c
U   trunk/res/res_musiconhold.c
U   trunk/rtp.c
U   trunk/sched.c

------------------------------------------------------------------------
r1486 | markster | 2008-01-15 14:34:00 -0600 (Tue, 15 Jan 2008) | 2 lines

BSD portability enhancements (bug ASTERISK-231)

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

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