test/lpf_test: fix int. sanitizer warning
implicit conversion from type 'int' of value 65594 (32-bit, signed)
to type 'uint16_t' (aka 'unsigned short') changed the value to
58 (16-bit, unsigned)
BUG=aomedia:2357
Change-Id: I4ce9663fbdf85769b1f3784a94e62c6e14814130
diff --git a/test/lpf_test.cc b/test/lpf_test.cc
index 451bffd..57cbb7d 100644
--- a/test/lpf_test.cc
+++ b/test/lpf_test.cc
@@ -72,9 +72,9 @@
if (j < 1) {
tmp_s[j] = rnd->Rand16();
} else if (val & 0x20) { // Increment by a value within the limit.
- tmp_s[j] = tmp_s[j - 1] + (limit - 1);
+ tmp_s[j] = static_cast<uint16_t>(tmp_s[j - 1] + (limit - 1));
} else { // Decrement by a value within the limit.
- tmp_s[j] = tmp_s[j - 1] - (limit - 1);
+ tmp_s[j] = static_cast<uint16_t>(tmp_s[j - 1] - (limit - 1));
}
j++;
}
@@ -91,11 +91,11 @@
if (j < 1) {
tmp_s[j] = rnd->Rand16();
} else if (val & 0x20) { // Increment by a value within the limit.
- tmp_s[(j % 32) * 32 + j / 32] =
- tmp_s[((j - 1) % 32) * 32 + (j - 1) / 32] + (limit - 1);
+ tmp_s[(j % 32) * 32 + j / 32] = static_cast<uint16_t>(
+ tmp_s[((j - 1) % 32) * 32 + (j - 1) / 32] + (limit - 1));
} else { // Decrement by a value within the limit.
- tmp_s[(j % 32) * 32 + j / 32] =
- tmp_s[((j - 1) % 32) * 32 + (j - 1) / 32] - (limit - 1);
+ tmp_s[(j % 32) * 32 + j / 32] = static_cast<uint16_t>(
+ tmp_s[((j - 1) % 32) * 32 + (j - 1) / 32] - (limit - 1));
}
j++;
}