Since no one is biting, I managed to fix most of the warnings by defining HAVE_ALLOCA_H and -Wno-parentheses in the Makefile.
Here’s a patch with the residuals:
* add default: break; for unhandled case statements
* change stddef.h include to stdlib.h for alloca() on BSD as per Tobias request