Fix gcc compile time warnings

.. in preparation for 3.1 release
.. but still need to fixup for Mac clang too