compiler: initialize saw_send_stmt locals
The C++ compiler wasn't warning because we take their address.
Fixes golang/go#43252
Change-Id: I52f6dc4a66a4dc33d41eb39334432a729c4a885f
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/279752
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
diff --git a/go/parse.cc b/go/parse.cc
index 3b2e5a7..1664fe3 100644
--- a/go/parse.cc
+++ b/go/parse.cc
@@ -4491,7 +4491,7 @@
bool saw_simple_stat = false;
Expression* switch_val = NULL;
- bool saw_send_stmt;
+ bool saw_send_stmt = false;
Type_switch type_switch;
bool have_type_switch_block = false;
if (this->simple_stat_may_start_here())
@@ -5326,7 +5326,7 @@
{
// We might be looking at a Condition, an InitStat, or a
// RangeClause.
- bool saw_send_stmt;
+ bool saw_send_stmt = false;
cond = this->simple_stat(false, &saw_send_stmt, &range_clause, NULL);
if (!this->peek_token()->is_op(OPERATOR_SEMICOLON))
{