From 173300a37bd820a17233645280838e4b1bfc5a79 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Mon, 28 Jan 2019 09:26:54 +0100 Subject: [PATCH] strife: explicitly declare a bit-shifted 1 literal as unsigned This fixes a future "Shifting signed 32-bit value by 31 bits is undefined behaviour" cppcheck error. --- src/strife/doomdef.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strife/doomdef.h b/src/strife/doomdef.h index 9fe179c7..cdb64541 100644 --- a/src/strife/doomdef.h +++ b/src/strife/doomdef.h @@ -269,7 +269,7 @@ enum QF_QUEST29 = (1 << tk_quest29), // Destroyed the Mines Transmitter QF_QUEST30 = (1 << tk_quest30), QF_QUEST31 = (1 << tk_quest31), - QF_QUEST32 = (1 << tk_quest32), // Unused; BUG: Broken Coupling accidentally sets it. + QF_QUEST32 = (1U << tk_quest32), // Unused; BUG: Broken Coupling accidentally sets it. QF_ALLQUESTS = (QF_QUEST31 + (QF_QUEST31 - 1)) // does not include bit 32! };