diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 6f4c8c0f5..f8befc969 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -370,6 +370,8 @@ endif # Clang 3.2 does only supports -fsanitize=address for the AddressSanitizer ifneq ($(PLATFORM),WINDOWS) CLANG_DEBUG_FLAGS := -fsanitize=address -fsanitize=bounds,enum,float-cast-overflow,object-size +# CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS),signed-integer-overflow +# CLANG_DEBUG_FLAGS := $(CLANG_DEBUG_FLAGS),unsigned-integer-overflow endif ifneq (0,$(RELEASE)) @@ -389,6 +391,9 @@ ifneq (0,$(RELEASE)) debug+= -fomit-frame-pointer -DNDEBUG else debug+= -DDEBUGGINGAIDS + ifneq (0,$(CLANG)) + debug+= $(CLANG_DEBUG_FLAGS) + endif endif ifneq (0,$(LTO)) BASELDFLAGS+= -flto diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 78a536e1f..f4f4ef193 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -2404,6 +2404,7 @@ typedef struct static permfifotype permfifo[MAXPERMS]; static int32_t permhead = 0, permtail = 0; +EDUKE32_STATIC_ASSERT(MAXWALLSB < INT16_MAX); int16_t numscans, numbunches; static int16_t numhits; int16_t capturecount = 0; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index c77d2474c..a91217c08 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -211,6 +211,7 @@ static inline int32_t VM_CheckSquished(void) return 1; } +#if !defined LUNATIC GAMEEXEC_STATIC GAMEEXEC_INLINE void P_ForceAngle(DukePlayer_t *p) { int32_t n = 128-(krand()&255); @@ -219,6 +220,7 @@ GAMEEXEC_STATIC GAMEEXEC_INLINE void P_ForceAngle(DukePlayer_t *p) p->return_to_center = 9; p->look_ang = p->rotscrnang = n>>1; } +#endif int32_t A_Dodge(spritetype *s) {