Linaro GCC 4.9.1: fix compilation errors

Signed-off-by: flar2 <asegaert@gmail.com>
Linaro GCC 4.7 -o3 fixes

Signed-off-by: flar2 <asegaert@gmail.com>