Currently the gcc specific version only evaluates the arguments once,
while the generic version evaluates one argument twice, which can cause
debugging headaches when an argument has a side effect.  This patch at
least provides consistent behavior between compilers.

Signed-off-by: Kővágó, Zoltán <dirty.ice...@gmail.com>
---
 audio/audio.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/audio/audio.h b/audio/audio.h
index 68545b6..3a54e17 100644
--- a/audio/audio.h
+++ b/audio/audio.h
@@ -150,22 +150,8 @@ static inline void *advance (void *p, int incr)
     return (d + incr);
 }
 
-#ifdef __GNUC__
-#define audio_MIN(a, b) ( __extension__ ({      \
-    __typeof (a) ta = a;                        \
-    __typeof (b) tb = b;                        \
-    ((ta)>(tb)?(tb):(ta));                      \
-}))
-
-#define audio_MAX(a, b) ( __extension__ ({      \
-    __typeof (a) ta = a;                        \
-    __typeof (b) tb = b;                        \
-    ((ta)<(tb)?(tb):(ta));                      \
-}))
-#else
 #define audio_MIN(a, b) ((a)>(b)?(b):(a))
 #define audio_MAX(a, b) ((a)<(b)?(b):(a))
-#endif
 
 int wav_start_capture(AudioState *state, CaptureState *s, const char *path,
                       int freq, int bits, int nchannels);
-- 
2.4.5


Reply via email to