Fix a pile of compiler warnings on Linux (but sadly not on Windows).