diff options
author | Kinsey Moore <kmoore@digium.com> | 2012-06-11 15:23:30 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2012-06-11 15:23:30 +0000 |
commit | c6142cf2cc7312122abcf74d6ab1daf0ad1d72bf (patch) | |
tree | 3d00ae5c1e40b99710f72f10a1f65d62ce83b01d /res/res_config_odbc.c | |
parent | 566ea22e1878ad6a576431d1035a5fe9b4a936d1 (diff) |
Fix coverity UNUSED_VALUE findings in core support level files
Most of these were just saving returned values without using them and
in some cases the variable being saved to could be removed as well.
(issue ASTERISK-19672)
........
Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 368739 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_config_odbc.c')
-rw-r--r-- | res/res_config_odbc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c index 46922835f..66e15a02b 100644 --- a/res/res_config_odbc.c +++ b/res/res_config_odbc.c @@ -518,7 +518,7 @@ static int update_odbc(const char *database, const char *table, const char *keyf } va_arg(aq, const char *); - if (tableptr && !(column = ast_odbc_find_column(tableptr, newparam))) { + if (tableptr && !ast_odbc_find_column(tableptr, newparam)) { ast_log(LOG_WARNING, "Key field '%s' does not exist in table '%s@%s'. Update will fail\n", newparam, table, database); } @@ -587,7 +587,6 @@ static SQLHSTMT update2_prepare(struct odbc_obj *obj, void *data) SQLHSTMT stmt; va_list ap; struct odbc_cache_tables *tableptr = ast_odbc_find_table(ups->database, ups->table); - struct odbc_cache_columns *column; if (!sql) { if (tableptr) { @@ -619,7 +618,7 @@ static SQLHSTMT update2_prepare(struct odbc_obj *obj, void *data) while ((newparam = va_arg(ap, const char *))) { newval = va_arg(ap, const char *); - if ((column = ast_odbc_find_column(tableptr, newparam))) { + if (ast_odbc_find_column(tableptr, newparam)) { ast_str_append(&sql, 0, "%s%s=? ", first ? "" : ", ", newparam); SQLBindParameter(stmt, x++, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(newval), 0, (void *)newval, 0, NULL); first = 0; @@ -637,7 +636,7 @@ static SQLHSTMT update2_prepare(struct odbc_obj *obj, void *data) while ((newparam = va_arg(ap, const char *))) { newval = va_arg(ap, const char *); - if (!(column = ast_odbc_find_column(tableptr, newparam))) { + if (!ast_odbc_find_column(tableptr, newparam)) { va_end(ap); ast_log(LOG_ERROR, "One or more of the criteria columns '%s' on '%s@%s' for this update does not exist!\n", newparam, ups->table, ups->database); ast_odbc_release_table(tableptr); |