arbparser: add brackets to case blocks where variables are declared, to prevent warnings spam on GCC
@@ -121,7 +121,7 @@ eToken readNextToken(sCurStatus* curStatus) {
break;
- case '.':
+ case '.': {
curStatus->endOfToken = curStatus->codePtr + 1;
// Plain '.' is TOK_POINT, '..' is TOK_UPTO
@@ -167,7 +167,7 @@ eToken readNextToken(sCurStatus* curStatus) {
while (e-- != 0) curStatus->tokFloat *= s ? 10.f : 0.1f;
}
- break;
+ break; }
case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N':
@@ -2854,7 +2854,7 @@ void parseToken(sCurStatus* curStatusPtr, int vertex, char **error_msg, struct s
curStatusPtr->curValue.newVar.state = 12;
break;
- case TOK_END_OF_INST:
+ case TOK_END_OF_INST: {
if ((curStatusPtr->curValue.newVar.state != 1) && (curStatusPtr->curValue.newVar.state != 12)) {
FAIL("Invalid state");
}
@@ -2897,7 +2897,7 @@ void parseToken(sCurStatus* curStatusPtr, int vertex, char **error_msg, struct s
curStatusPtr->valueType = TYPE_NONE;
curStatusPtr->status = ST_LINE_START;
- break;
+ break; }
case TOK_WHITESPACE:
case TOK_NEWLINE:
@@ -3031,7 +3031,7 @@ void parseToken(sCurStatus* curStatusPtr, int vertex, char **error_msg, struct s
}
break;
- case TOK_END_OF_INST:
+ case TOK_END_OF_INST: {
if (curStatusPtr->curValue.newVar.state != 15) {
FAIL("Invalid state");
}
@@ -3090,7 +3090,7 @@ void parseToken(sCurStatus* curStatusPtr, int vertex, char **error_msg, struct s
curStatusPtr->valueType = TYPE_NONE;
curStatusPtr->status = ST_LINE_START;
- break;
+ break; }
case TOK_WHITESPACE:
case TOK_NEWLINE:
@@ -3145,7 +3145,7 @@ void parseToken(sCurStatus* curStatusPtr, int vertex, char **error_msg, struct s
break;
case ST_ALIASING:
switch (curStatusPtr->curToken) {
- case TOK_IDENTIFIER:
+ case TOK_IDENTIFIER: {
if (curStatusPtr->valueType != TYPE_ALIAS_DECL) {
// Already aliased
FAIL("Too many identifiers");
@@ -3170,7 +3170,7 @@ void parseToken(sCurStatus* curStatusPtr, int vertex, char **error_msg, struct s
kh_val(curStatusPtr->varsMap, varIdx) = var;
curStatusPtr->valueType = TYPE_NONE;
- break;
+ break; }
case TOK_WHITESPACE:
case TOK_NEWLINE:
