Fix gcc longjmp warning in api.c