MAINT: signal: clean up some C code to eliminate a few compiler warnings

The C code still needs a PEP 7 clean up, but that can wait for a different PR.