Clean up GCC warnings on Android compilation

Corrects a bug, and avoid an error from #589