Core/Misc: Fix some static analysis issues
Fix some static analysis issues about: - uninitialized values, most of which are false positives, always initialized before being accessed - unchecked return values - dead code never executed - bad formatting leading to wrong behavior Please ensure EventMap is never used with event id set to 0 or those events will never execute.
This commit is contained in:
1 parent
409f4bffd5
commit
6dcd8c8545
17 files changed
+85
-19
No files matched your search
@@ -42,13 +42,13 @@ bool BasicStatementTask::Execute()
|
||||
if (m_has_result)
|
||||
{
|
||||
ResultSet* result = m_conn->Query(m_sql);
|
||||
if (!result || !result->GetRowCount())
|
||||
if (!result || !result->GetRowCount() || !result->NextRow())
|
||||
{
|
||||
delete result;
|
||||
m_result.set(QueryResult(NULL));
|
||||
return false;
|
||||
}
|
||||
result->NextRow();
|
||||
|
||||
m_result.set(QueryResult(result));
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user