1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #-: Initialize var in parser

This commit is contained in:
Ruben S. Montero 2020-07-10 13:15:32 +02:00
parent d1aa94424a
commit b72b19a89f
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87
2 changed files with 2 additions and 2 deletions

View File

@ -1410,7 +1410,7 @@ yyreduce:
case 4:
#line 103 "expr_arith.y"
{ float val; oxml->search((yyvsp[0].val_str), val); (yyval.val_float) = val; }
{ float val = 0; oxml->search((yyvsp[0].val_str), val); (yyval.val_float) = val; }
#line 1415 "expr_arith.cc"
break;

View File

@ -100,7 +100,7 @@ stmt: expr { result = static_cast<int>($1);}
| { result = 0; }
;
expr: STRING { float val; oxml->search($1, val); $$ = val; }
expr: STRING { float val = 0; oxml->search($1, val); $$ = val; }
| FLOAT { $$ = $1; }
| INTEGER { $$ = static_cast<float>($1); }
| expr '+' expr { $$ = $1 + $3;}