From df55a29ab07825888e14188c6e3d2a4e743bf266 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Wed, 26 Aug 2020 13:17:05 -0700 Subject: Initialize an uninitialized enum. hardware/google/av/codec2/tests/C2UtilTest.cpp:82:39: error: variable 'e3' is uninitialized when passed as a const reference argument here [-Werror,-Wuninitialized-const-reference] C2FieldDescriptor::namedValuesFor(e3); ^~ Bug: http://b/155835175 Test: mm in hardware/google/av/codec2/tests Change-Id: Icfc703a3c86c6db95bf2a2178b8ae37d7e19fee2 Merged-In: Ice26c9676a5a2c16e43ca1a5f3373ca780e005eb --- codec2/tests/C2UtilTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec2/tests/C2UtilTest.cpp b/codec2/tests/C2UtilTest.cpp index 59cd313..2d66df1 100644 --- a/codec2/tests/C2UtilTest.cpp +++ b/codec2/tests/C2UtilTest.cpp @@ -78,7 +78,7 @@ TEST_F(C2UtilTest, EnumUtilsTest) { { "value2", Enum3Value2 }, { "value4", Enum3Value4 }, { "invalid", Invalid } }); - Enum3 e3; + Enum3 e3(Invalid); C2FieldDescriptor::namedValuesFor(e3); // upper case -- cgit v1.2.3