From 209a78a439da68e2d0bdac16bc2580f39cbeb74a Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 12 Oct 2011 17:34:09 -0700 Subject: [PATCH] Remove a more cppcheck warnings in vhdlpp. This patch removes a few more cppcheck warnings in the vhdlpp directory. --- vhdlpp/lexor.lex | 6 +++--- vhdlpp/scope.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vhdlpp/lexor.lex b/vhdlpp/lexor.lex index bf300c6f3..9ab591168 100644 --- a/vhdlpp/lexor.lex +++ b/vhdlpp/lexor.lex @@ -278,7 +278,7 @@ static bool is_based_correct(char* text) if(base == 0) return 0; } - bool point = 0; + bool point = false; set allowed_chars; unsigned c; @@ -299,12 +299,12 @@ static bool is_based_correct(char* text) if(*ptr == '.') { //we found a dot and another one was already found - if(point == 1) + if(point) return 0; else { //notice the fact of finding a point and continue, without increasing the length - point = 1; + point = true; continue; } } diff --git a/vhdlpp/scope.h b/vhdlpp/scope.h index d2127674f..121b46627 100644 --- a/vhdlpp/scope.h +++ b/vhdlpp/scope.h @@ -118,7 +118,7 @@ class Scope : public ScopeBase { class ActiveScope : public ScopeBase { public: - ActiveScope() { } + ActiveScope() : context_entity_(0) { } ActiveScope(ActiveScope*par) : ScopeBase(*par), context_entity_(0) { } ~ActiveScope() { }