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:
@@ -1551,13 +1551,16 @@ bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode,con
|
||||
{
|
||||
bOk = false;
|
||||
}
|
||||
OUString sColumnName,sTableRange;
|
||||
OSQLParseTreeIterator::getColumnRange( pNode->getChild(0), _xConnection, sColumnName, sTableRange );
|
||||
bOk = sTableRange == _sUpdateTableName;
|
||||
if ( !bOk )
|
||||
else
|
||||
{
|
||||
OSQLParseTreeIterator::getColumnRange( pNode->getChild(2), _xConnection, sColumnName, sTableRange );
|
||||
bOk = sTableRange == _sUpdateTableName;
|
||||
OUString sColumnName,sTableRange;
|
||||
OSQLParseTreeIterator::getColumnRange( pNode->getChild(0), _xConnection, sColumnName, sTableRange );
|
||||
bOk = sTableRange == _sUpdateTableName;
|
||||
if ( !bOk )
|
||||
{
|
||||
OSQLParseTreeIterator::getColumnRange( pNode->getChild(2), _xConnection, sColumnName, sTableRange );
|
||||
bOk = sTableRange == _sUpdateTableName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return bOk;
|
||||
|
Reference in New Issue
Block a user