Remove unused variable

Also fixes a warning about use of an undefined variable.

Change-Id: Ib9ef421f169caaa9a669af6f28648175c14a4306