Allow certain variables to be unused

This fixes some warnings found with clang analyzer and also possible
future warnings of for example GCC if they decide to start warning on
this stuff.