Fix a bunch of potential compiler warnings.