From c73b8be2440e424f304fda22e43240e8b90f9b00 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 12 Jul 2017 14:45:14 -0400 Subject: [PATCH] Explicitly initialize prevector::_union to avoid new warning Warning from gcc 7.1 is ./prevector.h:450:25: warning: '*((void*)(&)+8).prevector<28, unsigned char>::_union.prevector<28, unsigned char>::direct_or_indirect::.prevector<28, unsigned char>::direct_or_indirect::::indirect' may be used uninitialized in this function [-Wmaybe-uninitialized] --- src/prevector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prevector.h b/src/prevector.h index 02d860bb0..46640d6ff 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);