Fix linaro -O3 warning (incorrect code hacked to be equivalent)
merging crpalmer's linaro 4.8 fixes