Fix compiler warnings with shadowed declarations