fix gcc warnings on shadowed declarations