Turns out variable declarations aren't allowed in C switch/case blocks.