Fix a bunch of compile warnings

As detected by the XCode analyser.  Most are trivial.

@opdemkamp mind checking the EPGGrid one?