Warning fixes

Fixed a few warnings generated even on my ancient gcc.