Remove unused variables.
Merge pull request #10704 from XhmikosR/various

rm unused vars