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:
@@ -1570,6 +1570,8 @@ create_subroom(
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
DISABLE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/*
|
||||
* Create a new door in a room.
|
||||
* It's placed on a wall (north, south, east or west).
|
||||
@@ -1659,6 +1661,7 @@ create_door(room_door* dd, struct mkroom* broom)
|
||||
default:
|
||||
x = y = 0;
|
||||
panic("create_door: No wall for door!");
|
||||
/*UNREACHABLE_CODE*/
|
||||
goto outdirloop;
|
||||
}
|
||||
outdirloop:
|
||||
@@ -1675,6 +1678,8 @@ create_door(room_door* dd, struct mkroom* broom)
|
||||
levl[x][y].doormask = dd->mask;
|
||||
}
|
||||
|
||||
RESTORE_WARNING_UNREACHABLE_CODE
|
||||
|
||||
/*
|
||||
* Create a secret door in croom on any one of the specified walls.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user