mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user