diff options
author | Matt Corallo <git@bluematt.me> | 2017-07-12 14:45:14 -0400 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2017-07-14 20:52:38 -0400 |
commit | c73b8be2440e424f304fda22e43240e8b90f9b00 (patch) | |
tree | c62a40bb6ced14945159775410ccedb48a58d1c1 /src/prevector.h | |
parent | 1016dacfaca5014c6af377ca787c36cf5dea88e8 (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.h | 2 |
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); |