mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Add default clauses to switch statements
Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -87,6 +87,8 @@ static void pushcontext(void)
|
||||
(*ppFileStack)->nREPTBlockSize = nCurrentREPTBlockSize;
|
||||
(*ppFileStack)->nREPTBlockCount = nCurrentREPTBlockCount;
|
||||
break;
|
||||
default:
|
||||
fatalerror("%s: Internal error.", __func__);
|
||||
}
|
||||
|
||||
nLineNo = 0;
|
||||
@@ -152,6 +154,8 @@ static int32_t popcontext(void)
|
||||
nCurrentREPTBlockSize = pLastFile->nREPTBlockSize;
|
||||
nCurrentREPTBlockCount = pLastFile->nREPTBlockCount;
|
||||
break;
|
||||
default:
|
||||
fatalerror("%s: Internal error.", __func__);
|
||||
}
|
||||
|
||||
free(*ppLastFile);
|
||||
@@ -174,6 +178,8 @@ int32_t fstk_GetLine(void)
|
||||
return nLineNo; /* ??? */
|
||||
case STAT_isREPTBlock:
|
||||
break; /* Peek top file of the stack */
|
||||
default:
|
||||
fatalerror("%s: Internal error.", __func__);
|
||||
}
|
||||
|
||||
pLastFile = pFileStack;
|
||||
|
||||
@@ -93,6 +93,9 @@ static int32_t ascii2bin(char *s)
|
||||
s += 1;
|
||||
convertfunc = binary2bin;
|
||||
break;
|
||||
default:
|
||||
/* Handle below */
|
||||
break;
|
||||
}
|
||||
|
||||
if (radix == 4) {
|
||||
|
||||
@@ -850,7 +850,7 @@ uint32_t yylex(void)
|
||||
return yylex_NORMAL();
|
||||
case LEX_STATE_MACROARGS:
|
||||
return yylex_MACROARGS();
|
||||
default:
|
||||
fatalerror("%s: Internal error.", __func__);
|
||||
}
|
||||
|
||||
fatalerror("Internal error in %s", __func__);
|
||||
}
|
||||
|
||||
@@ -617,6 +617,9 @@ void AssignSections(void)
|
||||
pSection->nOrg, pSection->nBank);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errx(1, "%s: Internal error: Type %d", __func__,
|
||||
pSection->Type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -325,6 +325,8 @@ void Patch(void)
|
||||
pPatch->nLineNo);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
errx(1, "%s: Internal error.", __func__);
|
||||
}
|
||||
|
||||
pPatch = pPatch->pNext;
|
||||
|
||||
Reference in New Issue
Block a user