[Home]

Summary:ASTERISK-13278: res_musiconhold won't compile anymore after ao2 fixes
Reporter:Michiel van Baak (mvanbaak)Labels:
Date Opened:2008-12-27 18:35:39.000-0600Date Closed:2009-01-14 14:27:27.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_musiconhold
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Commit 166273 made res_musiconhold non-compilable.
See additional information for the error messages.

****** STEPS TO REPRODUCE ******

./configure --enable-dev-mode && gmake

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

  [CCi] res_musiconhold.i -> res_musiconhold.o
res_musiconhold.c: In function `moh_files_release':
res_musiconhold.c:217: warning: assignment makes pointer from integer without a cast
res_musiconhold.c: In function `moh_files_alloc':
res_musiconhold.c:331: warning: assignment makes pointer from integer without a cast
res_musiconhold.c: In function `moh_handle_digit':
res_musiconhold.c:368: warning: assignment makes pointer from integer without a cast
res_musiconhold.c: In function `moh_release':
res_musiconhold.c:787: warning: assignment makes pointer from integer without a cast
res_musiconhold.c: In function `moh_register':
res_musiconhold.c:1080: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1081: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1084: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1092: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1099: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1104: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1110: warning: assignment makes pointer from integer without a cast
res_musiconhold.c: In function `local_ast_moh_start':
res_musiconhold.c:1211: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1217: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1222: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1233: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1246: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1282: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1292: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1298: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1329: warning: assignment makes pointer from integer without a cast
res_musiconhold.c: In function `load_moh_classes':
res_musiconhold.c:1498: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1504: warning: assignment makes pointer from integer without a cast
res_musiconhold.c:1509: warning: assignment makes pointer from integer without a cast
res_musiconhold.c: In function `unload_module':
res_musiconhold.c:1705: warning: assignment makes pointer from integer without a cast
gmake[1]: *** [res_musiconhold.o] Error 1
gmake: *** [res] Error 2
Comments:By: Russell Bryant (russell) 2008-12-28 09:35:32.000-0600

Um ... it compiles just fine for me.  Are you sure you don't have some local modifications or a merge conflict?

By: Russell Bryant (russell) 2008-12-28 09:39:51.000-0600

All of the line numbers are where I used mohclass_unref().  Can you verify that you have the mohclass_unref() macro near the top of the file?

By: Michiel van Baak (mvanbaak) 2008-12-28 09:40:22.000-0600

Yes, I'm really sure.
This is a new checkout on a brandnew virtual machine.

$ svn st
X      menuselect

Performing status on external item at 'menuselect'
X      menuselect/mxml

Performing status on external item at 'menuselect/mxml'
$ svn info
Path: .
URL: http://svn.digium.com/svn/asterisk/trunk
Repository Root: http://svn.digium.com/svn/asterisk
Repository UUID: f38db490-d61c-443f-a65b-d21fe96a405b
Revision: 166823
Node Kind: directory
Schedule: normal
Last Changed Author: eliel
Last Changed Rev: 166823
Last Changed Date: 2008-12-28 16:36:25 +0100 (Sun, 28 Dec 2008)

$ gcc -v
Reading specs from /usr/lib/gcc-lib/amd64-unknown-openbsd4.4/3.3.5/specs
Configured with:
Thread model: single
gcc version 3.3.5 (propolice)
$ gmake -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-unknown-openbsd4.4

By: Michiel van Baak (mvanbaak) 2008-12-28 09:42:04.000-0600

sure:

$ grep -rni 'mohclass_unref' res/res_musiconhold.c | grep define                                                                                                                    
res/res_musiconhold.c:190:#define mohclass_unref(class) (ao2_ref((class), -1), NULL)

By: Sean Bright (seanbright) 2009-01-14 14:27:27.000-0600

This was resolved with asterisk revision 168198.