From bddcf758d3a68ac0bcc3bc4fc4aa7156e05245d4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 20 Sep 2015 11:37:57 +0200 Subject: [PATCH] tests/checkasm/vp9dsp: Add () to protect macro arguments Signed-off-by: Michael Niedermayer --- tests/checkasm/vp9dsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/vp9dsp.c b/tests/checkasm/vp9dsp.c index f64b48a822..146a71fbb5 100644 --- a/tests/checkasm/vp9dsp.c +++ b/tests/checkasm/vp9dsp.c @@ -102,7 +102,7 @@ static void check_ipred(void) ((uint16_t *)buf0)[(a) + (b) * jstride] = c; \ } \ } while (0) -#define setdx(a,b,c,d) setpx(a,b,c-(d)+(rnd()%((d)*2+1))) +#define setdx(a,b,c,d) setpx(a,b,(c)-(d)+(rnd()%((d)*2+1))) #define setsx(a,b,c,d) setdx(a,b,c,(d) << (bit_depth - 8)) #define randomize_buffers(bidx, lineoff, str) \ do { \ @@ -220,7 +220,7 @@ static void check_loopfilter() randomize_buffers(0, 0, 16); randomize_buffers(1, 8, 16); memcpy(buf1 - midoff, buf0 - midoff, 16 * 16 * SIZEOF_PIXEL); -#define M(a) ((a[1] << 8) | a[0]) +#define M(a) (((a)[1] << 8) | (a)[0]) call_ref(buf0, 16 * SIZEOF_PIXEL, M(E), M(I), M(H)); call_new(buf1, 16 * SIZEOF_PIXEL, M(E), M(I), M(H)); if (memcmp(buf0 - midoff, buf1 - midoff, 16 * 16 * SIZEOF_PIXEL))