Fix a logic error warning of the type "assigned value is garbage or
undefined" emitted by Clang Static Analyzer on the following file:
Signed-off-by: Apelete Seketeli <firstname.lastname@example.org>
Fix a logic error warning of the type "called C++ object pointer is null" emitted by Clang Static Analyzer on the following file
What does this error mean? It seems like a case where we would get a maybe uninitialized warning, if -Wmaybe-uninitialized was enabled (but its my understanding that there is a conscious decision not to enable this warning for llvm). In this case, we have assertion checks (noted below) that ensure we never use these without initializing them.
If we need to fix this case to silence an analyzer, I'd rather initialize those abbrevs to 0 and add an assert down near the uses that they are non-zero (as noted below the default added in this patch doesn't make sense for this bitcode record type).
These are not correct abbrev ids for this code.
The above 2 asserts will ensure that we never reach here without initializing FnEntry*BitAbbrev.
These were needed to suppress a warning in case branch at line 2513 evaluates to 'false'.
I was not sure about which abbrev ids to assign variables FnEntry8BitAbbrev, FnEntry7BitAbbrev and FnEntry6BitAbbrev.
[scan-build] fix warning emitted on LLVM Bitcode code base
Changes since last revision: