[lld] f2fd158 - [ELF] Fix dead initialization. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 09:27:47 PST 2022
Author: Fangrui Song
Date: 2022-02-14T09:27:42-08:00
New Revision: f2fd1587bc54d9a6803eef7daede4c052ab19850
URL: https://github.com/llvm/llvm-project/commit/f2fd1587bc54d9a6803eef7daede4c052ab19850
DIFF: https://github.com/llvm/llvm-project/commit/f2fd1587bc54d9a6803eef7daede4c052ab19850.diff
LOG: [ELF] Fix dead initialization. NFC
Reported by scan-build.
Added:
Modified:
lld/ELF/ARMErrataFix.cpp
Removed:
################################################################################
diff --git a/lld/ELF/ARMErrataFix.cpp b/lld/ELF/ARMErrataFix.cpp
index 7eb771a50902a..bf277b298587d 100644
--- a/lld/ELF/ARMErrataFix.cpp
+++ b/lld/ELF/ARMErrataFix.cpp
@@ -206,7 +206,7 @@ static bool branchDestInFirstRegion(const InputSection *isec, uint64_t off,
uint32_t instr, const Relocation *r) {
uint64_t sourceAddr = isec->getVA(0) + off;
assert((sourceAddr & 0xfff) == 0xffe);
- uint64_t destAddr = sourceAddr;
+ uint64_t destAddr;
// If there is a branch relocation at the same offset we must use this to
// find the destination address as the branch could be indirected via a thunk
// or the PLT.
More information about the llvm-commits
mailing list