re-enable -Wunreachable-code under clang
whitelist the valid cases showing up If an earlier version of clang is showing more cases (particularly if they don't make sense), the re-enabling of the warning in sys/unix/hints/include/compiler.2020 can be made clang-version specific instead. I had no way to test earlier versions.
This commit is contained in:
@@ -116,6 +116,8 @@ l_nhcore_call(int callidx)
|
||||
}
|
||||
}
|
||||
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
void
|
||||
nhl_error(lua_State *L, const char *msg)
|
||||
{
|
||||
@@ -136,8 +138,11 @@ nhl_error(lua_State *L, const char *msg)
|
||||
#endif
|
||||
(void) lua_error(L);
|
||||
/*NOTREACHED*/
|
||||
/* UNREACHABLE_CODE */
|
||||
}
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/* Check that parameters are nothing but single table,
|
||||
or if no parameters given, put empty table there */
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user