[compiling] Build with -Wshadow and fix errors from that.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>