|
From: Paul F. <pa...@so...> - 2023-01-29 16:50:22
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=44a6e87492a3c83f25e1d7b3158264121df0632e commit 44a6e87492a3c83f25e1d7b3158264121df0632e Author: Paul Floyd <pj...@wa...> Date: Sun Jan 29 17:49:11 2023 +0100 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: --- coregrind/m_debuginfo/tinfl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 |