mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-26 06:20:16 -04:00
Merge pull request #1365 from fabiangreffrath/noreturn
mark I_ErrorOrSuccess() with attribute NORETURN
This commit is contained in:
commit
f67fb0784e
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
@ -141,4 +141,5 @@ jobs:
|
||||
- name: Run cppcheck
|
||||
shell: bash
|
||||
run: |
|
||||
cppcheck --version ; cppcheck --error-exitcode=1 -j4 -q --force -U_WIN32 -Isrc opl src setup textscreen
|
||||
cppcheck --version
|
||||
cppcheck --error-exitcode=1 -j4 -q --force -D__GNUC__ -U_MSC_VER -U_WIN32 -Isrc opl src setup textscreen
|
||||
|
@ -294,7 +294,7 @@ static int G_NextWeapon(int direction)
|
||||
|
||||
if (i == arrlen(weapon_order_table))
|
||||
{
|
||||
return wp_nochange;
|
||||
I_Error("G_NextWeapon: Invalid weapon type %d", (int)weapon);
|
||||
}
|
||||
|
||||
// Switch weapon. Don't loop forever.
|
||||
|
@ -60,7 +60,7 @@ ticcmd_t* I_BaseTiccmd (void);
|
||||
|
||||
// killough 3/20/98: add const
|
||||
// killough 4/25/98: add gcc attributes
|
||||
void I_ErrorOrSuccess(int err_code, const char *error, ...) PRINTF_ATTR(2, 3);
|
||||
void I_ErrorOrSuccess(int err_code, const char *error, ...) NORETURN PRINTF_ATTR(2, 3);
|
||||
#define I_Error(...) I_ErrorOrSuccess(-1, __VA_ARGS__)
|
||||
#define I_Success(...) I_ErrorOrSuccess(0, __VA_ARGS__)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user