Fixes for GCC 4.8 unused vars

Change-Id: I57393ab3b016d883a1f4a1ba2049f9ce1d6718f1