Massaging code to fix shadow variables found by -Wshadow. Signed-off-by: Daniel Leung <daniel.leung@intel.com>