checkbufferoverrun: remove dead store

the variable was declared inside a loop and the dead store also took place inside the loop (guarded by a condition) without further access of the value after that store.
Found by clang analyzer.

Was:

lib/checkbufferoverrun.cpp:1223:17: warning: Value stored to 'tok' is never read
                tok = tok->next();
                ^     ~~~~~~~~~~~
This commit is contained in:
Matthias Krüger 2017-08-01 16:15:35 +02:00
parent 9ef9d0e4a8
commit 9b6d371762
1 changed files with 0 additions and 2 deletions

View File

@ -1219,8 +1219,6 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable()
} while (tok && tok->str() != ";");
if (!tok)
break;
if (tok->str() == "{")
tok = tok->next();
arrayInfos[var->declarationId()] = ArrayInfo(&*var, symbolDatabase, var->declarationId());
}
if (!arrayInfos.empty())