MAINT: fix some compiler warnings

implicit declarations, wrong declarations, unused variables and fixes a
comparison typo bug in multiarraymodule.c
Merge pull request #3362 from juliantaylor/compiler-warnings

MAINT: fix some compiler warnings