aboutsummaryrefslogtreecommitdiff
path: root/lld/COFF
diff options
context:
space:
mode:
authorJacek Caban <jacek@codeweavers.com>2023-12-12 14:45:42 +0100
committerGitHub <noreply@github.com>2023-12-12 14:45:42 +0100
commitccec22b675195bf45a5e34583a866ab881f94dde (patch)
tree79b6d1d10ccc0f0ebe3d53eb7d8b87706676208e /lld/COFF
parentedcc7fe9aae54221b80631f5441354a04ad40b3b (diff)
downloadllvm-ccec22b675195bf45a5e34583a866ab881f94dde.zip
llvm-ccec22b675195bf45a5e34583a866ab881f94dde.tar.gz
llvm-ccec22b675195bf45a5e34583a866ab881f94dde.tar.bz2
[lld][NFC] Silence -Wuninitialized GCC 11 warnings. (#75183)
Use of those variables is guarded by lastType, so they are not actually used uninitialized.
Diffstat (limited to 'lld/COFF')
-rw-r--r--lld/COFF/Writer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp
index 7b1ff80..89e0f5b 100644
--- a/lld/COFF/Writer.cpp
+++ b/lld/COFF/Writer.cpp
@@ -560,7 +560,7 @@ void Writer::createECCodeMap() {
codeMap.clear();
std::optional<chpe_range_type> lastType;
- Chunk *first, *last;
+ Chunk *first = nullptr, *last = nullptr;
auto closeRange = [&]() {
if (lastType) {