From 0dbcd2a49e9bf91fcce84bcfea89fa078e20d093 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sat, 14 Aug 2021 11:50:50 +0800 Subject: [PATCH] Fix CID 338448: Uninitialized scalar field (UNINIT_CTOR) member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize key --- src/hashnode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hashnode.h b/src/hashnode.h index 2b145deb..36d4a26e 100644 --- a/src/hashnode.h +++ b/src/hashnode.h @@ -56,7 +56,7 @@ namespace CTSL // Concurrent Thread Safe Library HashNode *next; // Pointer to the next node in the same bucket #endif private: - K key; // the key key + K key {0}; // the key key V value; // the value corresponding to the key };