This, however, isn't an if-statement scope.  It's an artificial block to enclose some statements.  We might be able to simply do without it, in fact - but compilers can be a bit snippy about variables defined in one case of a switch, for reasons that don't actually apply in modern C (and I'm not feeling up to trying to explain here at all).
So: @tzz, try killing these braces entirely - if the compiler is happy, we can all be happy too.