]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4125] Fixed variable init (BTW a false positive as ctx.error throws)
authorFrancis Dupont <fdupont@isc.org>
Sat, 14 Nov 2015 20:54:29 +0000 (21:54 +0100)
committerFrancis Dupont <fdupont@isc.org>
Sat, 14 Nov 2015 20:54:29 +0000 (21:54 +0100)
src/lib/eval/parser.cc
src/lib/eval/parser.yy

index c2c07d1230279b86e6e1461cf3b7935b6a6eefa2..4e7dd72610185cfcc739088f4be3ac3e2d34ce6d 100644 (file)
@@ -595,7 +595,7 @@ namespace isc { namespace eval {
   case 6:
 #line 90 "parser.yy" // lalr1.cc:859
     {
-                      int n;
+                      int n = 0;
                       try {
                           n  = boost::lexical_cast<int>(yystack_[1].value.as< std::string > ());
                       } catch (const boost::bad_lexical_cast &) {
index b4a3237c96b2e4da5c4ec49830ef7af1ce69acef..c4a131934aba97451c0cbf176c2cb0469d92750b 100644 (file)
@@ -88,7 +88,7 @@ string_expr : STRING
                   }
             | OPTION "[" INTEGER "]"
                   {
-                      int n;
+                      int n = 0;
                       try {
                           n  = boost::lexical_cast<int>($3);
                       } catch (const boost::bad_lexical_cast &) {