Fixed code to compile in gcc with -Wshadow.