fix warnings and errors found with -Wall -Wextra

 - configured with CPPFLAGS="-Wall -Wextra", built, and fixed all warnings
 - fixed code paths that resulted in use of uninitialized variables
 - fixed unchecked comparisons between signed and unsigned vars
 - marked unused params
 - moved static functions out of header files
 - removed useless "const" modifier on integral return values
undo accidental reversion of pathfinding commit
Merge remote-tracking branch 'upstream/master' into myk-fix-gcc-warnings
use same spacing as master
another spacing fix; diff should now be minimal
Merge remote-tracking branch 'upstream/master' into myk-fix-gcc-warnings
Merge remote-tracking branch 'upstream/master' into myk-fix-gcc-warnings
fix signed/unsigned comparison
Merge remote-tracking branch 'upstream/master' into myk-fix-gcc-warnings
clean up unused vars
Merge remote-tracking branch 'upstream/master' into myk-fix-gcc-warnings
Merge remote-tracking branch 'upstream/master' into myk-fix-gcc-warnings
remove UNUSED_PARAM macro, comment out params
Merge pull request #534 from myk002/myk-fix-gcc-warnings

fix warnings and errors found with -Wall -Wextra