src/libFLAC/include/private/macros.h : Fix flac_min.

The existing flac_min macro was generating -Wshadow compiler warnings
when nested.
This commit is contained in:
Erik de Castro Lopo
2013-03-10 22:02:07 +11:00
parent dd1fa80883
commit 0a2b901e99

View File

@@ -39,10 +39,14 @@
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; })
#define flac_min(a,b) \
({ __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; })
#define MIN_PASTE(A,B) A##B
#define MIN_IMPL(A,B,L) ({ \
__typeof__(A) MIN_PASTE(__a,L) = (A); \
__typeof__(B) MIN_PASTE(__b,L) = (B); \
MIN_PASTE(__a,L) < MIN_PASTE(__b,L) ? MIN_PASTE(__a,L) : MIN_PASTE(__b,L); \
})
#define flac_min(A,B) MIN_IMPL(A,B,__COUNTER__)
/* Whatever other unix that has sys/param.h */
#elif defined(HAVE_SYS_PARAM_H)