Maybe move this out of the switch statement. Old gcc versions tend to complain when a non-void function doesn't end with a return statement. Silly, really, but what can you do?