static analysis: ensure sym is set Set sym to an invalid value so that the test fails if it is not decoded. Change-Id: I5c953807c5a1e35aa0621cceddb16b0b7ba2567d
diff --git a/test/ec_test.cc b/test/ec_test.cc index e6a5ea6..853abcb 100644 --- a/test/ec_test.cc +++ b/test/ec_test.cc
@@ -22,7 +22,6 @@ int sz; int i; int ret; - unsigned int sym; unsigned int seed; unsigned char *ptr; uint32_t ptr_sz; @@ -90,6 +89,8 @@ << " (Random seed: " << seed << ").\n"; for (j = 0; j < sz; j++) { int dec_method; + unsigned int sym = data[j] + 1; // Initialize sym to an invalid value. + if (CDF_SHIFT == 0) { dec_method = 3 + (rand() & 1); } else {