Fix compiler warnings (unused, shadow)

Change-Id: Icc98a3772f09da08d87bc4f51f7c8a873613754c