diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 603a5029f..4747eca6f 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -3732,7 +3732,7 @@ class [[nodiscard]] ElementsAreMatcherImpl // the end of either the elements or the matchers, or until we find a // mismatch. for (; it != stl_container.end() && exam_pos != count(); ++it, ++exam_pos) { - bool match; // Does the current element match the current matcher? + bool match = false; // Does the current element match the current matcher? if (listener_interested) { StringMatchResultListener s; match = matchers_[exam_pos].MatchAndExplain(*it, &s);