[asterisk-commits] trunk r19095 - /trunk/funcs/func_odbc.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Apr 10 22:37:06 MST 2006
Author: tilghman
Date: Tue Apr 11 00:37:05 2006
New Revision: 19095
URL: http://svn.digium.com/view/asterisk?rev=19095&view=rev
Log:
Bugs 6883, 6930: compiler warnings
Modified:
trunk/funcs/func_odbc.c
Modified: trunk/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_odbc.c?rev=19095&r1=19094&r2=19095&view=diff
==============================================================================
--- trunk/funcs/func_odbc.c (original)
+++ trunk/funcs/func_odbc.c Tue Apr 11 00:37:05 2006
@@ -418,11 +418,11 @@
(*query)->acf = calloc(1, sizeof(struct ast_custom_function));
if ((*query)->acf) {
- asprintf(&((*query)->acf->name), "ODBC_%s", catg);
- asprintf(&((*query)->acf->syntax), "ODBC_%s(<arg1>[...[,<argN>]])", catg);
+ asprintf((char **)&((*query)->acf->name), "ODBC_%s", catg);
+ asprintf((char **)&((*query)->acf->syntax), "ODBC_%s(<arg1>[...[,<argN>]])", catg);
(*query)->acf->synopsis = "Runs the referenced query with the specified arguments";
if (!ast_strlen_zero((*query)->sql_read) && !ast_strlen_zero((*query)->sql_write)) {
- asprintf(&((*query)->acf->desc),
+ asprintf((char **)&((*query)->acf->desc),
"Runs the following query, as defined in func_odbc.conf, performing\n"
"substitution of the arguments into the query as specified by ${ARG1},\n"
"${ARG2}, ... ${ARGn}. When setting the function, the values are provided\n"
@@ -431,13 +431,13 @@
(*query)->sql_read,
(*query)->sql_write);
} else if (!ast_strlen_zero((*query)->sql_read)) {
- asprintf(&((*query)->acf->desc),
+ asprintf((char **)&((*query)->acf->desc),
"Runs the following query, as defined in func_odbc.conf, performing\n"
"substitution of the arguments into the query as specified by ${ARG1},\n"
"${ARG2}, ... ${ARGn}. This function may only be read, not set.\n\nSQL:\n%s\n",
(*query)->sql_read);
} else if (!ast_strlen_zero((*query)->sql_write)) {
- asprintf(&((*query)->acf->desc),
+ asprintf((char **)&((*query)->acf->desc),
"Runs the following query, as defined in func_odbc.conf, performing\n"
"substitution of the arguments into the query as specified by ${ARG1},\n"
"${ARG2}, ... ${ARGn}. The values are provided either in whole as\n"
@@ -472,11 +472,11 @@
if (query) {
if (query->acf) {
if (query->acf->name)
- free(query->acf->name);
+ free((char *)query->acf->name);
if (query->acf->syntax)
- free(query->acf->syntax);
+ free((char *)query->acf->syntax);
if (query->acf->desc)
- free(query->acf->desc);
+ free((char *)query->acf->desc);
free(query->acf);
}
free(query);
More information about the asterisk-commits
mailing list