Fix places where a variable is never used.

Found with XCode 5's static analyis tool.