aboutsummaryrefslogtreecommitdiff
path: root/src/prevector.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-07-12 14:45:14 -0400
committerMatt Corallo <git@bluematt.me>2017-07-14 20:52:38 -0400
commitc73b8be2440e424f304fda22e43240e8b90f9b00 (patch)
treec62a40bb6ced14945159775410ccedb48a58d1c1 /src/prevector.h
parent1016dacfaca5014c6af377ca787c36cf5dea88e8 (diff)
Explicitly initialize prevector::_union to avoid new warning
Warning from gcc 7.1 is ./prevector.h:450:25: warning: '*((void*)(&<anonymous>)+8).prevector<28, unsigned char>::_union.prevector<28, unsigned char>::direct_or_indirect::<anonymous>.prevector<28, unsigned char>::direct_or_indirect::<unnamed struct>::indirect' may be used uninitialized in this function [-Wmaybe-uninitialized]
Diffstat (limited to 'src/prevector.h')
-rw-r--r--src/prevector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/prevector.h b/src/prevector.h
index 02d860bb00..46640d6fff 100644
--- a/src/prevector.h
+++ b/src/prevector.h
@@ -220,7 +220,7 @@ public:
}
}
- prevector() : _size(0) {}
+ prevector() : _size(0), _union{{}} {}
explicit prevector(size_type n) : _size(0) {
resize(n);