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

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
Merge pull request #47 from saukko/master

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