Fix warnings for use of parentheses with shifts.
Remove unused variables.