From cdeaa5b3d5e9e8b7e5ec575268b04457edc87830 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 3 Feb 2020 10:48:15 +0200 Subject: [PATCH] - suppressed omnipresent GCC warning source/build/include/compat.h:1043:21: warning: self-comparison always evaluates to true [-Wtautological-compare] --- source/build/include/compat.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/build/include/compat.h b/source/build/include/compat.h index ec25c69c4..d0da3ec86 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -1039,8 +1039,15 @@ static FORCE_INLINE void *xrealloc(void * const ptr, const bsize_t size) return (EDUKE32_PREDICT_TRUE(newptr != NULL || size == 0)) ? newptr: handle_memerr(ptr); } +#if EDUKE32_GCC_PREREQ(6,0) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wtautological-compare" +#endif // This will throw up when BFree is no longer usable, I do not want to change all code right now that uses it to make future merges easier. static_assert(Bfree == free, "BFree must be free"); +#if EDUKE32_GCC_PREREQ(6,0) +# pragma GCC diagnostic pop +#endif static FORCE_INLINE void xfree(void *const ptr) { Bfree(ptr); }