mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
lex.c: add default, though it should never happen (re: b0282f26)
If a bug is ever introduced that causes a [[ ... ]] operator to be unhandled by the linter, we should at least avoid writing random memory contents to standard error. In non-release builds, let's abort() so the problem can be more easily backtraced.
This commit is contained in:
parent
6904585f49
commit
520f530198
1 changed files with 7 additions and 0 deletions
|
@ -1411,6 +1411,13 @@ breakloop:
|
|||
case TEST_GE:
|
||||
alt = ">="; /* '-ge' --> '>=' */
|
||||
break;
|
||||
default:
|
||||
#if _AST_ksh_release
|
||||
alt = NIL(char*); /* output '(null)' (should never happen) */
|
||||
#else
|
||||
abort();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
errormsg(SH_DICT, ERROR_warn(0), e_lexobsolete4,
|
||||
shp->inlineno, state, alt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue