From c261978e19a21acd5cb2a9ec3342f3766b6352dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20G=C3=BCdemann?= Date: Fri, 3 Feb 2017 14:12:27 +0100 Subject: [PATCH] specify initial values for Boolean in struct optiont Gave read of uninitilized Boolean value. Just a cleanup, no effect apart from observation via UB check. --- src/util/cmdline.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/util/cmdline.h b/src/util/cmdline.h index 1fb10dd298a..c689c8e3447 100644 --- a/src/util/cmdline.h +++ b/src/util/cmdline.h @@ -39,10 +39,19 @@ class cmdlinet protected: struct optiont { - bool isset, hasval, islong; + bool isset; + bool hasval; + bool islong; char optchar; std::string optstring; std::list values; + public: + optiont(): + isset(false), + hasval(false), + islong(false), + optchar(0) + {} }; std::vector options;