Assumed fix of a clang-analyzer-deadcode.DeadStores

...where the "bOk = false" from the leading "if" is always overwritten in the
following check of "bOk = sTableRange == _sUpdateTableName".  The code had been
effectively like that ever since it got introduced with
4ae41a466a "INTEGRATION: CWS dba30," but it looks
broken.  I assume the two checks of "sTableRange == _sUpdateTableName" for
pNode->GetChild(0) and pNode->GetChild(2) shall only be done if the leading "if"
is not hit.  (And one remaining uncertainty is if really only one of those
"sTableRange == _sUpdateTableName" checks needs to be true or if both should be
true for bOk to be true.)

Change-Id: I453690d65326ed67d7a074d4e4783a743a60d454
This commit is contained in:
Stephan Bergmann
2015-10-13 17:35:11 +02:00
parent 2c5f5976b2
commit 7ea5ad6e46

View File

@@ -1551,6 +1551,8 @@ bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode,con
{ {
bOk = false; bOk = false;
} }
else
{
OUString sColumnName,sTableRange; OUString sColumnName,sTableRange;
OSQLParseTreeIterator::getColumnRange( pNode->getChild(0), _xConnection, sColumnName, sTableRange ); OSQLParseTreeIterator::getColumnRange( pNode->getChild(0), _xConnection, sColumnName, sTableRange );
bOk = sTableRange == _sUpdateTableName; bOk = sTableRange == _sUpdateTableName;
@@ -1560,6 +1562,7 @@ bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode,con
bOk = sTableRange == _sUpdateTableName; bOk = sTableRange == _sUpdateTableName;
} }
} }
}
return bOk; return bOk;
} }