Prevent a number of warnings under g++.

Unused variables, out-of-order initializations, signed/unsigned comparisons.
Removed reference to outdated make target.
Merge remote-tracking branch: upstream/master