Browse Source

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]
0.15
Matt Corallo 7 years ago
parent
commit
c73b8be244
  1. 2
      src/prevector.h

2
src/prevector.h

@ -220,7 +220,7 @@ public: @@ -220,7 +220,7 @@ public:
}
}
prevector() : _size(0) {}
prevector() : _size(0), _union{{}} {}
explicit prevector(size_type n) : _size(0) {
resize(n);

Loading…
Cancel
Save