[NFC] clean up some compiler warnings with -pedantic -Wall -Wextra

- low priority