Fix build warnings on Windows.

Removed 2 unused local variables and made integer to boolean conversion explicit.

Change-Id: I259d65dff93acecc8df54c31c958ad58b94909b2