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)->nREPTBlockSize = nCurrentREPTBlockSize;
|
||||||
(*ppFileStack)->nREPTBlockCount = nCurrentREPTBlockCount;
|
(*ppFileStack)->nREPTBlockCount = nCurrentREPTBlockCount;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
fatalerror("%s: Internal error.", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
nLineNo = 0;
|
nLineNo = 0;
|
||||||
@@ -152,6 +154,8 @@ static int32_t popcontext(void)
|
|||||||
nCurrentREPTBlockSize = pLastFile->nREPTBlockSize;
|
nCurrentREPTBlockSize = pLastFile->nREPTBlockSize;
|
||||||
nCurrentREPTBlockCount = pLastFile->nREPTBlockCount;
|
nCurrentREPTBlockCount = pLastFile->nREPTBlockCount;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
fatalerror("%s: Internal error.", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(*ppLastFile);
|
free(*ppLastFile);
|
||||||
@@ -174,6 +178,8 @@ int32_t fstk_GetLine(void)
|
|||||||
return nLineNo; /* ??? */
|
return nLineNo; /* ??? */
|
||||||
case STAT_isREPTBlock:
|
case STAT_isREPTBlock:
|
||||||
break; /* Peek top file of the stack */
|
break; /* Peek top file of the stack */
|
||||||
|
default:
|
||||||
|
fatalerror("%s: Internal error.", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
pLastFile = pFileStack;
|
pLastFile = pFileStack;
|
||||||
|
|||||||
@@ -93,6 +93,9 @@ static int32_t ascii2bin(char *s)
|
|||||||
s += 1;
|
s += 1;
|
||||||
convertfunc = binary2bin;
|
convertfunc = binary2bin;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
/* Handle below */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radix == 4) {
|
if (radix == 4) {
|
||||||
|
|||||||
@@ -850,7 +850,7 @@ uint32_t yylex(void)
|
|||||||
return yylex_NORMAL();
|
return yylex_NORMAL();
|
||||||
case LEX_STATE_MACROARGS:
|
case LEX_STATE_MACROARGS:
|
||||||
return yylex_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);
|
pSection->nOrg, pSection->nBank);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
errx(1, "%s: Internal error: Type %d", __func__,
|
||||||
|
pSection->Type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -325,6 +325,8 @@ void Patch(void)
|
|||||||
pPatch->nLineNo);
|
pPatch->nLineNo);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
errx(1, "%s: Internal error.", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
pPatch = pPatch->pNext;
|
pPatch = pPatch->pNext;
|
||||||
|
|||||||
Reference in New Issue
Block a user