[llvm] bcb47bb - Fix "use of uninitialized variable" static analyzer warnings. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 02:56:02 PST 2020
Author: Simon Pilgrim
Date: 2020-01-07T10:55:38Z
New Revision: bcb47bbd7214b2795eb114df22ef745850abccb2
URL: https://github.com/llvm/llvm-project/commit/bcb47bbd7214b2795eb114df22ef745850abccb2
DIFF: https://github.com/llvm/llvm-project/commit/bcb47bbd7214b2795eb114df22ef745850abccb2.diff
LOG: Fix "use of uninitialized variable" static analyzer warnings. NFCI.
Added:
Modified:
llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp
index 2d53750ad0ee..0544758f8a25 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp
@@ -154,8 +154,8 @@ class MipsNaClELFStreamer : public MipsELFStreamer {
}
// Sandbox loads, stores and SP changes.
- unsigned AddrIdx;
- bool IsStore;
+ unsigned AddrIdx = 0;
+ bool IsStore = false;
bool IsMemAccess = isBasePlusOffsetMemoryAccess(Inst.getOpcode(), &AddrIdx,
&IsStore);
bool IsSPFirstOperand = isStackPointerFirstOperand(Inst);
More information about the llvm-commits
mailing list