From 8c5aa5086d77d62ecf80ea10e0c684335435d6e7 Mon Sep 17 00:00:00 2001 From: Zoey Greer Date: Tue, 2 Sep 2014 12:56:06 -0400 Subject: [PATCH] Initialize data_ in value_base default constructor This means data_ should get initialized in the default constructor for boost::unordered::detail::unique_node (and any other inheritors), as this constructor will be called there. This uninitialized data member was reported by Coverity (CID 49445), which unfortunately does not seem to have any convenient way to publicly, globally address issues. --- include/boost/unordered/detail/table.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/unordered/detail/table.hpp b/include/boost/unordered/detail/table.hpp index 7b4cc0ec..2bb5d450 100644 --- a/include/boost/unordered/detail/table.hpp +++ b/include/boost/unordered/detail/table.hpp @@ -59,6 +59,10 @@ namespace boost { namespace unordered { namespace detail { sizeof(value_type), boost::alignment_of::value>::type data_; + value_base() : + data_() + {} + void* address() { return this; }