[trunk] Fix warnings about shadow variables