MAINT: fix a bunch of compiler warnings
Merge pull request #4349 from juliantaylor/warning-maint

MAINT: fix a bunch of compiler warnings