From: Paul Floyd Date: Sun, 29 Jan 2023 16:49:11 +0000 (+0100) Subject: Compiler warning expansion to defined X-Git-Tag: VALGRIND_3_21_0~192 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44a6e87492a3c83f25e1d7b3158264121df0632e;p=thirdparty%2Fvalgrind.git Compiler warning expansion to defined Clang doesn't like m_debuginfo/tinfl.c:182:45: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] --- diff --git a/coregrind/m_debuginfo/tinfl.c b/coregrind/m_debuginfo/tinfl.c index 890e0c4dd4..970e0b8275 100644 --- a/coregrind/m_debuginfo/tinfl.c +++ b/coregrind/m_debuginfo/tinfl.c @@ -51,7 +51,6 @@ typedef ULong mz_uint64; #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 #endif -#define MINIZ_LITTLE_ENDIAN ( defined(VG_LITTLEENDIAN) ) #define MINIZ_HAS_64BIT_REGISTERS ( VG_WORDSIZE == 8 ) // Works around MSVC's spammy "warning C4127: conditional expression is @@ -179,7 +178,7 @@ struct tinfl_decompressor_tag #define MZ_MIN(a,b) (((a)<(b))?(a):(b)) #define MZ_CLEAR_OBJ(obj) VG_(memset)(&(obj), 0, sizeof(obj)) -#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && MINIZ_LITTLE_ENDIAN +#if MINIZ_USE_UNALIGNED_LOADS_AND_STORES && defined(VG_LITTLEENDIAN) #define MZ_READ_LE16(p) *((const mz_uint16 *)(p)) #define MZ_READ_LE32(p) *((const mz_uint32 *)(p)) #else