aomedia /
avm /
4e69284b7eb42c739efbf7114caca121efa2124c Rewrite some loops to avoid -Wunsafe-loop-optimizations warnings.
For example, loops of the form:
"for (i = 0; i < 1 + max_value; ++i) ..." or
"for (i = 0; i <= max_value; ++i) ..." are possibly infinite loops,
theoretically speaking (even if practically, they aren't).
So, compiler cannot optimize those loops.
When possible, I rewrote such loops to be finite even theoretically.
Change-Id: Ied47a24833b689c0ec011f8645cf1c01856f7c59
2 files changed