diff --git a/src/asm/fstack.c b/src/asm/fstack.c index 19d58e20..ead50395 100644 --- a/src/asm/fstack.c +++ b/src/asm/fstack.c @@ -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; diff --git a/src/asm/globlex.c b/src/asm/globlex.c index 9dae47bc..b25afde0 100644 --- a/src/asm/globlex.c +++ b/src/asm/globlex.c @@ -93,6 +93,9 @@ static int32_t ascii2bin(char *s) s += 1; convertfunc = binary2bin; break; + default: + /* Handle below */ + break; } if (radix == 4) { diff --git a/src/asm/lexer.c b/src/asm/lexer.c index b789f567..fd0b3d17 100644 --- a/src/asm/lexer.c +++ b/src/asm/lexer.c @@ -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__); } diff --git a/src/link/assign.c b/src/link/assign.c index fca668cd..73c644ae 100644 --- a/src/link/assign.c +++ b/src/link/assign.c @@ -617,6 +617,9 @@ void AssignSections(void) pSection->nOrg, pSection->nBank); } break; + default: + errx(1, "%s: Internal error: Type %d", __func__, + pSection->Type); } } diff --git a/src/link/patch.c b/src/link/patch.c index 9d704264..f3d036bf 100644 --- a/src/link/patch.c +++ b/src/link/patch.c @@ -325,6 +325,8 @@ void Patch(void) pPatch->nLineNo); } break; + default: + errx(1, "%s: Internal error.", __func__); } pPatch = pPatch->pNext;