[asterisk-commits] russell: branch group/asterisk-cpp r168380 - in /team/group/asterisk-cpp: inc...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 10 14:38:44 CST 2009


Author: russell
Date: Sat Jan 10 14:38:44 2009
New Revision: 168380

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=168380
Log:
Fix up linkedlists.h and get a couple more things building

Modified:
    team/group/asterisk-cpp/include/asterisk/audiohook.h
    team/group/asterisk-cpp/include/asterisk/channel.h
    team/group/asterisk-cpp/include/asterisk/chanvars.h
    team/group/asterisk-cpp/include/asterisk/cli.h
    team/group/asterisk-cpp/include/asterisk/datastore.h
    team/group/asterisk-cpp/include/asterisk/features.h
    team/group/asterisk-cpp/include/asterisk/frame.h
    team/group/asterisk-cpp/include/asterisk/http.h
    team/group/asterisk-cpp/include/asterisk/jabber.h
    team/group/asterisk-cpp/include/asterisk/linkedlists.h
    team/group/asterisk-cpp/include/asterisk/network.h
    team/group/asterisk-cpp/include/asterisk/res_odbc.h
    team/group/asterisk-cpp/include/asterisk/rtp.h
    team/group/asterisk-cpp/include/asterisk/taskprocessor.h
    team/group/asterisk-cpp/include/asterisk/translate.h
    team/group/asterisk-cpp/main/app.c
    team/group/asterisk-cpp/main/ast_expr2.c
    team/group/asterisk-cpp/main/ast_expr2.fl
    team/group/asterisk-cpp/main/ast_expr2.h
    team/group/asterisk-cpp/main/ast_expr2.y
    team/group/asterisk-cpp/main/ast_expr2f.c
    team/group/asterisk-cpp/main/asterisk.c

Modified: team/group/asterisk-cpp/include/asterisk/audiohook.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/audiohook.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/audiohook.h (original)
+++ team/group/asterisk-cpp/include/asterisk/audiohook.h Sat Jan 10 14:38:44 2009
@@ -25,7 +25,7 @@
 
 /* these two are used in struct ast_audiohook */
 #include "asterisk/lock.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 #include "asterisk/slinfactory.h"
 

Modified: team/group/asterisk-cpp/include/asterisk/channel.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/channel.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/channel.h (original)
+++ team/group/asterisk-cpp/include/asterisk/channel.h Sat Jan 10 14:38:44 2009
@@ -144,7 +144,7 @@
 #include "asterisk/lock.h"
 #include "asterisk/cdr.h"
 #include "asterisk/utils.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 #include "asterisk/stringfields.h"
 #include "asterisk/datastore.h"
 

Modified: team/group/asterisk-cpp/include/asterisk/chanvars.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/chanvars.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/chanvars.h (original)
+++ team/group/asterisk-cpp/include/asterisk/chanvars.h Sat Jan 10 14:38:44 2009
@@ -23,7 +23,7 @@
 #ifndef _ASTERISK_CHANVARS_H
 #define _ASTERISK_CHANVARS_H
 
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 struct ast_var_t {
 	AST_LIST_ENTRY(ast_var_t) entries;

Modified: team/group/asterisk-cpp/include/asterisk/cli.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/cli.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/cli.h (original)
+++ team/group/asterisk-cpp/include/asterisk/cli.h Sat Jan 10 14:38:44 2009
@@ -23,7 +23,7 @@
 #ifndef _ASTERISK_CLI_H
 #define _ASTERISK_CLI_H
 
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 void ast_cli(int fd, const char *fmt, ...)
 	__attribute__((format(printf, 2, 3)));
@@ -161,7 +161,7 @@
 	/*! \brief This gets set in ast_cli_register()
 	 */
 	int args;				/*!< number of non-null entries in cmda */
-	char *command;				/*!< command, non-null for new-style entries */
+	const char *command;				/*!< command, non-null for new-style entries */
 	cli_fn handler;
 	/*! For linking */
 	AST_LIST_ENTRY(ast_cli_entry) list;

Modified: team/group/asterisk-cpp/include/asterisk/datastore.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/datastore.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/datastore.h (original)
+++ team/group/asterisk-cpp/include/asterisk/datastore.h Sat Jan 10 14:38:44 2009
@@ -21,7 +21,7 @@
 #ifndef _ASTERISK_DATASTORE_H
 #define _ASTERISK_DATASTORE_H
 
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 /*! \brief Structure for a data store type */
 struct ast_datastore_info {

Modified: team/group/asterisk-cpp/include/asterisk/features.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/features.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/features.h (original)
+++ team/group/asterisk-cpp/include/asterisk/features.h Sat Jan 10 14:38:44 2009
@@ -25,7 +25,7 @@
 #define _AST_FEATURES_H
 
 #include "asterisk/pbx.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 #define FEATURE_MAX_LEN		11
 #define FEATURE_APP_LEN		64

Modified: team/group/asterisk-cpp/include/asterisk/frame.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/frame.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/frame.h (original)
+++ team/group/asterisk-cpp/include/asterisk/frame.h Sat Jan 10 14:38:44 2009
@@ -28,7 +28,7 @@
 #include <sys/time.h>
 
 #include "asterisk/endian.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 struct ast_codec_pref {
 	char order[32];

Modified: team/group/asterisk-cpp/include/asterisk/http.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/http.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/http.h (original)
+++ team/group/asterisk-cpp/include/asterisk/http.h Sat Jan 10 14:38:44 2009
@@ -21,7 +21,7 @@
 
 #include "asterisk/config.h"
 #include "asterisk/tcptls.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 /*!
  * \file http.h

Modified: team/group/asterisk-cpp/include/asterisk/jabber.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/jabber.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/jabber.h (original)
+++ team/group/asterisk-cpp/include/asterisk/jabber.h Sat Jan 10 14:38:44 2009
@@ -58,7 +58,7 @@
 
 #include <iksemel.h>
 #include "asterisk/astobj.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 /* 
  * As per RFC 3920 - section 3.1, the maximum length for a full Jabber ID 

Modified: team/group/asterisk-cpp/include/asterisk/linkedlists.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/linkedlists.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/linkedlists.h (original)
+++ team/group/asterisk-cpp/include/asterisk/linkedlists.h Sat Jan 10 14:38:44 2009
@@ -241,30 +241,14 @@
   This would define \c struct \c entry_list, intended to hold a list of
   type \c struct \c entry.
 */
-#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
 #define AST_LIST_HEAD_STATIC(name, type)				\
 struct name {								\
+	name(void) { ast_mutex_init(&lock); }   \
+	~name(void) { ast_mutex_destroy(&lock); } \
 	struct type *first;						\
 	struct type *last;						\
 	ast_mutex_t lock;						\
 } name;									\
-static void  __attribute__((constructor)) __init_##name(void)		\
-{									\
-        AST_LIST_HEAD_INIT(&name);					\
-}									\
-static void  __attribute__((destructor)) __fini_##name(void)		\
-{									\
-        AST_LIST_HEAD_DESTROY(&name);					\
-}									\
-struct __dummy_##name
-#else
-#define AST_LIST_HEAD_STATIC(name, type)				\
-struct name {								\
-	struct type *first;						\
-	struct type *last;						\
-	ast_mutex_t lock;						\
-} name = AST_LIST_HEAD_INIT_VALUE
-#endif
 
 /*!
   \brief Defines a structure to be used to hold a read/write list of specified type, statically initialized.
@@ -283,30 +267,14 @@
   This would define \c struct \c entry_list, intended to hold a list of
   type \c struct \c entry.
 */
-#ifndef AST_RWLOCK_INIT_VALUE
 #define AST_RWLIST_HEAD_STATIC(name, type)                              \
 struct name {                                                           \
+        name(void) { ast_rwlock_init(&lock); }                          \
+        ~name(void) { ast_rwlock_destroy(&lock); }                      \
         struct type *first;                                             \
         struct type *last;                                              \
         ast_rwlock_t lock;                                              \
 } name;                                                                 \
-static void  __attribute__((constructor)) __init_##name(void)          \
-{                                                                       \
-        AST_RWLIST_HEAD_INIT(&name);                                    \
-}                                                                       \
-static void  __attribute__((destructor)) __fini_##name(void)           \
-{                                                                       \
-        AST_RWLIST_HEAD_DESTROY(&name);                                 \
-}                                                                       \
-struct __dummy_##name
-#else
-#define AST_RWLIST_HEAD_STATIC(name, type)                              \
-struct name {                                                           \
-        struct type *first;                                             \
-        struct type *last;                                              \
-        ast_rwlock_t lock;                                              \
-} name = AST_RWLIST_HEAD_INIT_VALUE
-#endif
 
 /*!
   \brief Defines a structure to be used to hold a list of specified type, statically initialized.

Modified: team/group/asterisk-cpp/include/asterisk/network.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/network.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/network.h (original)
+++ team/group/asterisk-cpp/include/asterisk/network.h Sat Jan 10 14:38:44 2009
@@ -25,6 +25,8 @@
 
 #ifndef _ASTERISK_NETWORK_H
 #define _ASTERISK_NETWORK_H
+
+#include "asterisk.h"
 
 /*
  * Include relevant network headers.

Modified: team/group/asterisk-cpp/include/asterisk/res_odbc.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/res_odbc.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/res_odbc.h (original)
+++ team/group/asterisk-cpp/include/asterisk/res_odbc.h Sat Jan 10 14:38:44 2009
@@ -30,7 +30,7 @@
 #include <sql.h>
 #include <sqlext.h>
 #include <sqltypes.h>
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 typedef enum { ODBC_SUCCESS=0, ODBC_FAIL=-1} odbc_status;
 

Modified: team/group/asterisk-cpp/include/asterisk/rtp.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/rtp.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/rtp.h (original)
+++ team/group/asterisk-cpp/include/asterisk/rtp.h Sat Jan 10 14:38:44 2009
@@ -32,7 +32,7 @@
 #include "asterisk/io.h"
 #include "asterisk/sched.h"
 #include "asterisk/channel.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 
 /* Codes for RTP-specific data - not defined by our AST_FORMAT codes */
 /*! DTMF (RFC2833) */

Modified: team/group/asterisk-cpp/include/asterisk/taskprocessor.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/taskprocessor.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/taskprocessor.h (original)
+++ team/group/asterisk-cpp/include/asterisk/taskprocessor.h Sat Jan 10 14:38:44 2009
@@ -17,7 +17,7 @@
  */
 #include "asterisk.h"
 #include "asterisk/lock.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 #include "asterisk/utils.h"
 #include "asterisk/options.h"
 

Modified: team/group/asterisk-cpp/include/asterisk/translate.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/include/asterisk/translate.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/translate.h (original)
+++ team/group/asterisk-cpp/include/asterisk/translate.h Sat Jan 10 14:38:44 2009
@@ -30,7 +30,7 @@
 #if 1	/* need lots of stuff... */
 #include "asterisk/frame.h"
 #include "asterisk/plc.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 // XXX #include "asterisk/module.h"
 #endif
 

Modified: team/group/asterisk-cpp/main/app.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/app.c?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/main/app.c (original)
+++ team/group/asterisk-cpp/main/app.c Sat Jan 10 14:38:44 2009
@@ -43,7 +43,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/lock.h"
 #include "asterisk/indications.h"
-#include "asterisk/linkedlists_compat.hpp"
+#include "asterisk/linkedlists.h"
 #include "asterisk/threadstorage.h"
 
 AST_THREADSTORAGE_PUBLIC(global_app_buf);

Modified: team/group/asterisk-cpp/main/ast_expr2.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2.c?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2.c (original)
+++ team/group/asterisk-cpp/main/ast_expr2.c Sat Jan 10 14:38:44 2009
@@ -372,7 +372,7 @@
 } ;
 
 #ifdef STANDALONE
-void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) __attribute__((format(printf,5,6)));
+void ast_log(int level, const char *file, int line, const char *function, const char *fmt, ...) __attribute__ ((format (printf,5,6)));
 #endif
 
 struct val {
@@ -461,7 +461,7 @@
 /* I wanted to add args to the yyerror routine, so I could print out
    some useful info about the error. Not as easy as it looks, but it
    is possible. */
-#define ast_yyerror(x) ast_yyerror(x,&yyloc,parseio)
+#define ast_yyerror(x) ast_yyerror(x,&yyloc,(struct parse_io *)parseio)
 #define DESTROY(x) {if((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) free((x)->u.s); (x)->u.s = 0; free(x);}
 
 
@@ -485,13 +485,13 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 342 "ast_expr2.y"
+#line 344 "ast_expr2.y"
 {
 	struct val *val;
 	struct expr_node *arglist;
 }
 /* Line 187 of yacc.c.  */
-#line 493 "ast_expr2.c"
+#line 495 "ast_expr2.c"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -513,13 +513,13 @@
 
 
 /* Copy the second part of user declarations.  */
-#line 347 "ast_expr2.y"
+#line 349 "ast_expr2.y"
 
 extern int		ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
 
 
 /* Line 216 of yacc.c.  */
-#line 521 "ast_expr2.c"
+#line 523 "ast_expr2.c"
 
 #ifdef short
 # undef short
@@ -816,9 +816,9 @@
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   371,   371,   379,   386,   387,   396,   402,   403,   407,
-     411,   415,   419,   423,   427,   431,   435,   439,   443,   447,
-     451,   455,   459,   463,   467,   471,   475,   480
+       0,   373,   373,   381,   388,   389,   398,   404,   405,   409,
+     413,   417,   421,   425,   429,   433,   437,   441,   445,   449,
+     453,   457,   461,   465,   469,   473,   477,   482
 };
 #endif
 
@@ -1471,119 +1471,119 @@
   switch (yytype)
     {
       case 4: /* "TOK_COLONCOLON" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1475 "ast_expr2.c"
+#line 1477 "ast_expr2.c"
 	break;
       case 5: /* "TOK_COND" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1480 "ast_expr2.c"
+#line 1482 "ast_expr2.c"
 	break;
       case 6: /* "TOK_OR" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1485 "ast_expr2.c"
+#line 1487 "ast_expr2.c"
 	break;
       case 7: /* "TOK_AND" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1490 "ast_expr2.c"
+#line 1492 "ast_expr2.c"
 	break;
       case 8: /* "TOK_NE" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1495 "ast_expr2.c"
+#line 1497 "ast_expr2.c"
 	break;
       case 9: /* "TOK_LE" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1500 "ast_expr2.c"
+#line 1502 "ast_expr2.c"
 	break;
       case 10: /* "TOK_GE" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1505 "ast_expr2.c"
+#line 1507 "ast_expr2.c"
 	break;
       case 11: /* "TOK_LT" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1510 "ast_expr2.c"
+#line 1512 "ast_expr2.c"
 	break;
       case 12: /* "TOK_GT" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1515 "ast_expr2.c"
+#line 1517 "ast_expr2.c"
 	break;
       case 13: /* "TOK_EQ" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1520 "ast_expr2.c"
+#line 1522 "ast_expr2.c"
 	break;
       case 14: /* "TOK_MINUS" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1525 "ast_expr2.c"
+#line 1527 "ast_expr2.c"
 	break;
       case 15: /* "TOK_PLUS" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1530 "ast_expr2.c"
+#line 1532 "ast_expr2.c"
 	break;
       case 16: /* "TOK_MOD" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1535 "ast_expr2.c"
+#line 1537 "ast_expr2.c"
 	break;
       case 17: /* "TOK_DIV" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1540 "ast_expr2.c"
+#line 1542 "ast_expr2.c"
 	break;
       case 18: /* "TOK_MULT" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1545 "ast_expr2.c"
+#line 1547 "ast_expr2.c"
 	break;
       case 19: /* "TOK_COMPL" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1550 "ast_expr2.c"
+#line 1552 "ast_expr2.c"
 	break;
       case 20: /* "TOK_TILDETILDE" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1555 "ast_expr2.c"
+#line 1557 "ast_expr2.c"
 	break;
       case 21: /* "TOK_EQTILDE" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1560 "ast_expr2.c"
+#line 1562 "ast_expr2.c"
 	break;
       case 22: /* "TOK_COLON" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1565 "ast_expr2.c"
+#line 1567 "ast_expr2.c"
 	break;
       case 23: /* "TOK_LP" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1570 "ast_expr2.c"
+#line 1572 "ast_expr2.c"
 	break;
       case 24: /* "TOK_RP" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1575 "ast_expr2.c"
+#line 1577 "ast_expr2.c"
 	break;
       case 25: /* "TOKEN" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1580 "ast_expr2.c"
+#line 1582 "ast_expr2.c"
 	break;
       case 29: /* "expr" */
-#line 365 "ast_expr2.y"
+#line 367 "ast_expr2.y"
 	{  free_value((yyvaluep->val)); };
-#line 1585 "ast_expr2.c"
+#line 1587 "ast_expr2.c"
 	break;
 
       default:
@@ -1906,7 +1906,7 @@
   switch (yyn)
     {
         case 2:
-#line 371 "ast_expr2.y"
+#line 373 "ast_expr2.y"
     { ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
               ((struct parse_io *)parseio)->val->type = (yyvsp[(1) - (1)].val)->type;
               if( (yyvsp[(1) - (1)].val)->type == AST_EXPR_number )
@@ -1918,7 +1918,7 @@
     break;
 
   case 3:
-#line 379 "ast_expr2.y"
+#line 381 "ast_expr2.y"
     {/* nothing */ ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
               ((struct parse_io *)parseio)->val->type = AST_EXPR_string;
 			  ((struct parse_io *)parseio)->val->u.s = strdup(""); 
@@ -1926,12 +1926,12 @@
     break;
 
   case 4:
-#line 386 "ast_expr2.y"
+#line 388 "ast_expr2.y"
     { (yyval.arglist) = alloc_expr_node(AST_EXPR_NODE_VAL); (yyval.arglist)->val = (yyvsp[(1) - (1)].val);;}
     break;
 
   case 5:
-#line 387 "ast_expr2.y"
+#line 389 "ast_expr2.y"
     {struct expr_node *x = alloc_expr_node(AST_EXPR_NODE_VAL);
                                  struct expr_node *t;
 								 DESTROY((yyvsp[(2) - (3)].val));
@@ -1941,7 +1941,7 @@
     break;
 
   case 6:
-#line 396 "ast_expr2.y"
+#line 398 "ast_expr2.y"
     { (yyval.val) = op_func((yyvsp[(1) - (4)].val),(yyvsp[(3) - (4)].arglist), ((struct parse_io *)parseio)->chan);
 		                            DESTROY((yyvsp[(2) - (4)].val));
 									DESTROY((yyvsp[(4) - (4)].val));
@@ -1951,12 +1951,12 @@
     break;
 
   case 7:
-#line 402 "ast_expr2.y"
+#line 404 "ast_expr2.y"
     {(yyval.val) = (yyvsp[(1) - (1)].val);;}
     break;
 
   case 8:
-#line 403 "ast_expr2.y"
+#line 405 "ast_expr2.y"
     { (yyval.val) = (yyvsp[(2) - (3)].val);
 	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
 						   (yyloc).first_line=0; (yyloc).last_line=0;
@@ -1964,7 +1964,7 @@
     break;
 
   case 9:
-#line 407 "ast_expr2.y"
+#line 409 "ast_expr2.y"
     { (yyval.val) = op_or ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
 						DESTROY((yyvsp[(2) - (3)].val));	
                          (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -1972,7 +1972,7 @@
     break;
 
   case 10:
-#line 411 "ast_expr2.y"
+#line 413 "ast_expr2.y"
     { (yyval.val) = op_and ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -1980,7 +1980,7 @@
     break;
 
   case 11:
-#line 415 "ast_expr2.y"
+#line 417 "ast_expr2.y"
     { (yyval.val) = op_eq ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                     (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
@@ -1988,7 +1988,7 @@
     break;
 
   case 12:
-#line 419 "ast_expr2.y"
+#line 421 "ast_expr2.y"
     { (yyval.val) = op_gt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
 						DESTROY((yyvsp[(2) - (3)].val));	
                          (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
@@ -1996,7 +1996,7 @@
     break;
 
   case 13:
-#line 423 "ast_expr2.y"
+#line 425 "ast_expr2.y"
     { (yyval.val) = op_lt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                     (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2004,7 +2004,7 @@
     break;
 
   case 14:
-#line 427 "ast_expr2.y"
+#line 429 "ast_expr2.y"
     { (yyval.val) = op_ge ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2012,7 +2012,7 @@
     break;
 
   case 15:
-#line 431 "ast_expr2.y"
+#line 433 "ast_expr2.y"
     { (yyval.val) = op_le ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2020,7 +2020,7 @@
     break;
 
   case 16:
-#line 435 "ast_expr2.y"
+#line 437 "ast_expr2.y"
     { (yyval.val) = op_ne ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2028,7 +2028,7 @@
     break;
 
   case 17:
-#line 439 "ast_expr2.y"
+#line 441 "ast_expr2.y"
     { (yyval.val) = op_plus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2036,7 +2036,7 @@
     break;
 
   case 18:
-#line 443 "ast_expr2.y"
+#line 445 "ast_expr2.y"
     { (yyval.val) = op_minus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2044,7 +2044,7 @@
     break;
 
   case 19:
-#line 447 "ast_expr2.y"
+#line 449 "ast_expr2.y"
     { (yyval.val) = op_negate ((yyvsp[(2) - (2)].val)); 
 						DESTROY((yyvsp[(1) - (2)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column; 
@@ -2052,7 +2052,7 @@
     break;
 
   case 20:
-#line 451 "ast_expr2.y"
+#line 453 "ast_expr2.y"
     { (yyval.val) = op_compl ((yyvsp[(2) - (2)].val)); 
 						DESTROY((yyvsp[(1) - (2)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column; 
@@ -2060,7 +2060,7 @@
     break;
 
   case 21:
-#line 455 "ast_expr2.y"
+#line 457 "ast_expr2.y"
     { (yyval.val) = op_times ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2068,7 +2068,7 @@
     break;
 
   case 22:
-#line 459 "ast_expr2.y"
+#line 461 "ast_expr2.y"
     { (yyval.val) = op_div ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2076,7 +2076,7 @@
     break;
 
   case 23:
-#line 463 "ast_expr2.y"
+#line 465 "ast_expr2.y"
     { (yyval.val) = op_rem ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2084,7 +2084,7 @@
     break;
 
   case 24:
-#line 467 "ast_expr2.y"
+#line 469 "ast_expr2.y"
     { (yyval.val) = op_colon ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2092,7 +2092,7 @@
     break;
 
   case 25:
-#line 471 "ast_expr2.y"
+#line 473 "ast_expr2.y"
     { (yyval.val) = op_eqtilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2100,7 +2100,7 @@
     break;
 
   case 26:
-#line 475 "ast_expr2.y"
+#line 477 "ast_expr2.y"
     { (yyval.val) = op_cond ((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 
 						DESTROY((yyvsp[(2) - (5)].val));	
 						DESTROY((yyvsp[(4) - (5)].val));	
@@ -2109,7 +2109,7 @@
     break;
 
   case 27:
-#line 480 "ast_expr2.y"
+#line 482 "ast_expr2.y"
     { (yyval.val) = op_tildetilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
 						DESTROY((yyvsp[(2) - (3)].val));	
 	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
@@ -2118,7 +2118,7 @@
 
 
 /* Line 1267 of yacc.c.  */
-#line 2120 "ast_expr2.c"
+#line 2122 "ast_expr2.c"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2338,12 +2338,12 @@
 }
 
 
-#line 486 "ast_expr2.y"
+#line 488 "ast_expr2.y"
 
 
 static struct expr_node *alloc_expr_node(enum node_type nt)
 {
-	struct expr_node *x = calloc(1,sizeof(struct expr_node));
+	struct expr_node *x = (struct expr_node *) calloc(1,sizeof(struct expr_node));
 	if (!x) {
 		ast_log(LOG_ERROR, "Allocation for expr_node FAILED!!\n");
 		return 0;
@@ -2473,7 +2473,7 @@
 	if (vp->type == AST_EXPR_string || vp->type == AST_EXPR_numeric_string)
 		return;
 
-	tmp = malloc ((size_t)25);
+	tmp = (char *) malloc ((size_t)25);
 	if (tmp == NULL) {
 		ast_log(LOG_WARNING,"malloc() failed\n");
 		return;
@@ -2549,7 +2549,7 @@
 	}
 	total_len++; /* for the null */
 	ast_log(LOG_NOTICE,"argbuf allocated %d bytes;\n", total_len);
-	argbuf = malloc(total_len);
+	argbuf = (char *) malloc(total_len);
 	argbuf[0] = 0;
 	t = arglist;
 	while (t) {
@@ -3436,7 +3436,7 @@
 	strip_quotes(a);
 	strip_quotes(b);
 	
-	vs = malloc(strlen(a->u.s)+strlen(b->u.s)+1);
+	vs = (char *) malloc(strlen(a->u.s)+strlen(b->u.s)+1);
 	strcpy(vs,a->u.s);
 	strcat(vs,b->u.s);
 

Modified: team/group/asterisk-cpp/main/ast_expr2.fl
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2.fl?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2.fl (original)
+++ team/group/asterisk-cpp/main/ast_expr2.fl Sat Jan 10 14:38:44 2009
@@ -86,13 +86,13 @@
 	} while (0)
 
 #define SET_STRING	do {		\
-	yylval_param->val = calloc(1, sizeof(struct val));	\
+	yylval_param->val = (struct val *) calloc(1, sizeof(struct val));	\
 	yylval_param->val->type = AST_EXPR_string;		\
 	yylval_param->val->u.s = strdup(yytext);		\
 	} while (0)
 
 #define SET_NUMERIC_STRING	do {	\
-	yylval_param->val = calloc(1, sizeof(struct val));	\
+	yylval_param->val = (struct val *) calloc(1, sizeof(struct val));	\
 	yylval_param->val->type = AST_EXPR_numeric_string;	\
 	yylval_param->val->u.s = strdup(yytext);	\
 	} while (0)
@@ -308,7 +308,7 @@
        extra_error_message[0] = 0;
 }
 
-static char *expr2_token_equivs1[] = 
+static const char *expr2_token_equivs1[] = 
 {
 	"TOKEN",
 	"TOK_COND",
@@ -334,7 +334,7 @@
 	"TOK_LP"
 };
 
-static char *expr2_token_equivs2[] = 
+static const char *expr2_token_equivs2[] = 
 {
 	"<token>",
 	"?",
@@ -388,7 +388,7 @@
 		for (i=0; i<expr2_token_equivs_entries; i++) {
 			if ( strncmp(p,expr2_token_equivs1[i],strlen(expr2_token_equivs1[i])) == 0 ) {
 				*s++ = '\'';
-				for (t=expr2_token_equivs2[i]; *t;) {
+				for (t=(char *)expr2_token_equivs2[i]; *t;) {
 					*s++ = *t++;
 				}
 				*s++ = '\'';

Modified: team/group/asterisk-cpp/main/ast_expr2.h
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2.h?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2.h (original)
+++ team/group/asterisk-cpp/main/ast_expr2.h Sat Jan 10 14:38:44 2009
@@ -94,7 +94,7 @@
 
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
 typedef union YYSTYPE
-#line 342 "ast_expr2.y"
+#line 344 "ast_expr2.y"
 {
 	struct val *val;
 	struct expr_node *arglist;

Modified: team/group/asterisk-cpp/main/ast_expr2.y
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2.y?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2.y (original)
+++ team/group/asterisk-cpp/main/ast_expr2.y Sat Jan 10 14:38:44 2009
@@ -330,7 +330,7 @@
 /* I wanted to add args to the yyerror routine, so I could print out
    some useful info about the error. Not as easy as it looks, but it
    is possible. */
-#define ast_yyerror(x) ast_yyerror(x,&yyloc,parseio)
+#define ast_yyerror(x) ast_yyerror(x,&yyloc,(struct parse_io *)parseio)
 #define DESTROY(x) {if((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) free((x)->u.s); (x)->u.s = 0; free(x);}
 %}
  
@@ -489,7 +489,7 @@
 
 static struct expr_node *alloc_expr_node(enum node_type nt)
 {
-	struct expr_node *x = calloc(1,sizeof(struct expr_node));
+	struct expr_node *x = (struct expr_node *) calloc(1,sizeof(struct expr_node));
 	if (!x) {
 		ast_log(LOG_ERROR, "Allocation for expr_node FAILED!!\n");
 		return 0;
@@ -619,7 +619,7 @@
 	if (vp->type == AST_EXPR_string || vp->type == AST_EXPR_numeric_string)
 		return;
 
-	tmp = malloc ((size_t)25);
+	tmp = (char *) malloc ((size_t)25);
 	if (tmp == NULL) {
 		ast_log(LOG_WARNING,"malloc() failed\n");
 		return;
@@ -695,7 +695,7 @@
 	}
 	total_len++; /* for the null */
 	ast_log(LOG_NOTICE,"argbuf allocated %d bytes;\n", total_len);
-	argbuf = malloc(total_len);
+	argbuf = (char *) malloc(total_len);
 	argbuf[0] = 0;
 	t = arglist;
 	while (t) {
@@ -1582,7 +1582,7 @@
 	strip_quotes(a);
 	strip_quotes(b);
 	
-	vs = malloc(strlen(a->u.s)+strlen(b->u.s)+1);
+	vs = (char *) malloc(strlen(a->u.s)+strlen(b->u.s)+1);
 	strcpy(vs,a->u.s);
 	strcat(vs,b->u.s);
 

Modified: team/group/asterisk-cpp/main/ast_expr2f.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/ast_expr2f.c?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/main/ast_expr2f.c (original)
+++ team/group/asterisk-cpp/main/ast_expr2f.c Sat Jan 10 14:38:44 2009
@@ -2377,13 +2377,13 @@
 	} while (0)
 
 #define SET_STRING	do {		\
-	yylval_param->val = calloc(1, sizeof(struct val));	\
+	yylval_param->val = (struct val *) calloc(1, sizeof(struct val));	\
 	yylval_param->val->type = AST_EXPR_string;		\
 	yylval_param->val->u.s = strdup(yytext);		\
 	} while (0)
 
 #define SET_NUMERIC_STRING	do {	\
-	yylval_param->val = calloc(1, sizeof(struct val));	\
+	yylval_param->val = (struct val *) calloc(1, sizeof(struct val));	\
 	yylval_param->val->type = AST_EXPR_numeric_string;	\
 	yylval_param->val->u.s = strdup(yytext);	\
 	} while (0)
@@ -4214,7 +4214,7 @@
        extra_error_message[0] = 0;
 }
 
-static char *expr2_token_equivs1[] = 
+static const char *expr2_token_equivs1[] = 
 {
 	"TOKEN",
 	"TOK_COND",
@@ -4240,7 +4240,7 @@
 	"TOK_LP"
 };
 
-static char *expr2_token_equivs2[] = 
+static const char *expr2_token_equivs2[] = 
 {
 	"<token>",
 	"?",
@@ -4294,7 +4294,7 @@
 		for (i=0; i<expr2_token_equivs_entries; i++) {
 			if ( strncmp(p,expr2_token_equivs1[i],strlen(expr2_token_equivs1[i])) == 0 ) {
 				*s++ = '\'';
-				for (t=expr2_token_equivs2[i]; *t;) {
+				for (t=(char *)expr2_token_equivs2[i]; *t;) {
 					*s++ = *t++;
 				}
 				*s++ = '\'';

Modified: team/group/asterisk-cpp/main/asterisk.c
URL: http://svn.digium.com/svn-view/asterisk/team/group/asterisk-cpp/main/asterisk.c?view=diff&rev=168380&r1=168379&r2=168380
==============================================================================
--- team/group/asterisk-cpp/main/asterisk.c (original)
+++ team/group/asterisk-cpp/main/asterisk.c Sat Jan 10 14:38:44 2009
@@ -286,7 +286,7 @@
 
 void ast_register_file_version(const char *file, const char *version)
 {
-	struct file_version *new;
+	struct file_version *filever;
 	char *work;
 	size_t version_length;
 
@@ -294,14 +294,14 @@
 	work = ast_strip(ast_strip_quoted(work, "$", "$"));
 	version_length = strlen(work) + 1;
 	
-	if (!(new = ast_calloc(1, sizeof(*new) + version_length)))
+	if (!(filever = (struct file_version *) ast_calloc(1, sizeof(*filever) + version_length)))
 		return;
 
-	new->file = file;
-	new->version = (char *) new + sizeof(*new);
-	memcpy(new->version, work, version_length);
+	filever->file = file;
+	filever->version = (char *) filever + sizeof(*filever);
+	memcpy(filever->version, work, version_length);
 	AST_RWLIST_WRLOCK(&file_versions);
-	AST_RWLIST_INSERT_HEAD(&file_versions, new, list);
+	AST_RWLIST_INSERT_HEAD(&file_versions, filever, list);
 	AST_RWLIST_UNLOCK(&file_versions);
 }
 
@@ -370,14 +370,14 @@
 
 void ast_register_thread(char *name)
 { 
-	struct thread_list_t *new = ast_calloc(1, sizeof(*new));
-
-	if (!new)
+	struct thread_list_t *tl = (struct thread_list_t *) ast_calloc(1, sizeof(*tl));
+
+	if (!tl)
 		return;
-	new->id = pthread_self();
-	new->name = name; /* steal the allocated memory for the thread name */
+	tl->id = pthread_self();
+	tl->name = name; /* steal the allocated memory for the thread name */
 	AST_RWLIST_WRLOCK(&thread_list);
-	AST_RWLIST_INSERT_HEAD(&thread_list, new, list);
+	AST_RWLIST_INSERT_HEAD(&thread_list, tl, list);
 	AST_RWLIST_UNLOCK(&thread_list);
 }
 
@@ -659,7 +659,7 @@
 	int n = 10;	/* default entries */
 
 	if (prof_data == NULL) {
-		prof_data = ast_calloc(1, l + n*sizeof(struct profile_entry));
+		prof_data = (struct profile_data *) ast_calloc(1, l + n*sizeof(struct profile_entry));
 		if (prof_data == NULL)
 			return -1;
 		prof_data->entries = 0;
@@ -671,7 +671,7 @@
 		p = ast_realloc(prof_data, l + n*sizeof(struct profile_entry));
 		if (p == NULL)
 			return -1;
-		prof_data = p;
+		prof_data = (struct profile_data *) p;
 		prof_data->max_size = n;
 	}
 	n = prof_data->entries++;
@@ -898,7 +898,7 @@
 {
 	struct ast_atexit *ae;
 
-	if (!(ae = ast_calloc(1, sizeof(*ae))))
+	if (!(ae = (struct ast_atexit *) ast_calloc(1, sizeof(*ae))))
 		return -1;
 
 	ae->func = func;




More information about the asterisk-commits mailing list