Fix trivial warnings in utils

Removed unused variables and added more explicit returns to make the
real warnings actually stand out.