Commit 0a2b901e authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

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

The existing flac_min macro was generating -Wshadow compiler warnings
when nested.
parent dd1fa808
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment