about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorDaniel Schemmel <daniel.schemmel@comsys.rwth-aachen.de>2018-05-25 13:10:32 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2018-06-29 11:19:00 +0100
commit2ef1fa8fc2afd74236180e23ec77f6948e5295d6 (patch)
tree17fd621c7fac6b313390ff6097e4a52193bec0e4
parentcb1e6302f0a436eaad08014a22f4265b64b379d3 (diff)
downloadklee-2ef1fa8fc2afd74236180e23ec77f6948e5295d6.tar.gz
Explicitly initialize value to squelch a potentially uninitialized value warning
-rw-r--r--include/klee/Internal/ADT/MapOfSets.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/klee/Internal/ADT/MapOfSets.h b/include/klee/Internal/ADT/MapOfSets.h
index c7568577..a5acb059 100644
--- a/include/klee/Internal/ADT/MapOfSets.h
+++ b/include/klee/Internal/ADT/MapOfSets.h
@@ -99,7 +99,7 @@ namespace klee {
     std::map<K, Node> children;
     
   public:
-    Node() : isEndOfSet(false) {}
+    Node() : value(), isEndOfSet(false) {}
   };
   
   template<class K, class V>
@@ -187,9 +187,9 @@ namespace klee {
   template<class K, class V>
   void MapOfSets<K,V>::insert(const std::set<K> &set, const V &value) {
     Node *n = &root;
-    for (typename std::set<K>::const_iterator it = set.begin(), ie = set.end();
-         it != ie; ++it)
-      n = &n->children.insert(std::make_pair(*it, Node())).first->second;
+    for (auto const& element : set) {
+      n = &n->children.insert(std::make_pair(element, Node())).first->second;
+    }
     n->isEndOfSet = true;
     n->value = value;
   }