[Home]

Summary:ASTERISK-08365: [patch] C++ modules fails to compile, strings.h is not C++ clean
Reporter:mikma (mikma)Labels:
Date Opened:2006-12-18 04:54:03.000-0600Date Closed:2007-01-10 13:03:24.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) cc_strings.h
Description:C++ modules (for example chan_vpb.cc) that need to include asterisk headers are broken by the update to strings.h in revision 48515.


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

  [CXX] chan_vpb.cc -> chan_vpb.oo
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus: warning: command line option "-Wmissing-prototypes" is valid for Ada/C/ObjC but not for C++
cc1plus: warning: command line option "-Wmissing-declarations" is valid for C/ObjC but not for C++
include/asterisk/strings.h: In function ?ast_str* ast_str_create(size_t)?:
include/asterisk/strings.h:323: error: invalid conversion from ?void*? to ?ast_str*?
include/asterisk/strings.h: In function ?int ast_str_make_space(ast_str**, size_t)?:
include/asterisk/strings.h:342: error: invalid conversion from ?void*? to ?ast_str*?
include/asterisk/strings.h: In function ?ast_str* ast_str_thread_get(ast_threadstorage*, size_t)?:
include/asterisk/strings.h:403: error: invalid conversion from ?void*? to ?ast_str*?
Comments:By: Luigi Rizzo (rizzo) 2006-12-18 10:26:10.000-0600

applied fix to rev.48560, please let us know if it works.

By: Joshua C. Colp (jcolp) 2006-12-18 10:29:51.000-0600

Fixed in trunk as of revision 48560 per rizzo's commit. As he said if this is still an issue reopen and we/he can take a look at it.

By: mikma (mikma) 2007-01-10 06:08:49.000-0600

Fix was reverted in revision 49580. Please reapply the patch.

 * [asterisk-trunk @ 49580]
   ensure that the proper file/function/line shows up for dynamic string threadstorage objects
   remove pointless casts

By: Joshua C. Colp (jcolp) 2007-01-10 13:03:23.000-0600

Fixed yet again in revision 50397. I even left a note so someone wouldn't remove it.