Fixes for GCC 4.8 unused vars

Change-Id: I0834b3f8ce9cd24528da9bfaef166b1dcf81046b