[llvm] [ARMAsmBackend] Add checks for relocation addends in assembler (PR #109969)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 01:36:44 PDT 2024
================
@@ -1121,7 +1132,7 @@ void ARMAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!");
// Used to point to big endian bytes.
- unsigned FullSizeBytes;
+ unsigned FullSizeBytes = 0;
----------------
smithp35 wrote:
Is this necessary for this patch? If not then it could be moved out into a separate NFC refactor.
Looking at the code FullSizeBytes is only used when big endian, so it is always initialized when used. Is this tripping over a static analysis tool?
https://github.com/llvm/llvm-project/pull/109969
More information about the llvm-commits
mailing list