From 213e606752d16f51337e94431962fb5d7749c07e Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 2 Sep 2014 23:23:03 +0200 Subject: Replace av_unused attributes by block structures This is more portable and avoids warnings with compilers that do not properly support av_unused. --- libavcodec/rangecoder.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavcodec/rangecoder.h') diff --git a/libavcodec/rangecoder.h b/libavcodec/rangecoder.h index ad9c81faa4..4c88169790 100644 --- a/libavcodec/rangecoder.h +++ b/libavcodec/rangecoder.h @@ -115,7 +115,6 @@ static inline void refill(RangeCoder *c) static inline int get_rac(RangeCoder *c, uint8_t *const state) { int range1 = (c->range * (*state)) >> 8; - int av_unused one_mask; c->range -= range1; #if 1 @@ -131,13 +130,14 @@ static inline int get_rac(RangeCoder *c, uint8_t *const state) return 1; } #else - one_mask = (c->range - c->low - 1) >> 31; + { + int one_mask one_mask = (c->range - c->low - 1) >> 31; - c->low -= c->range & one_mask; - c->range += (range1 - c->range) & one_mask; - - *state = c->zero_state[(*state) + (256 & one_mask)]; + c->low -= c->range & one_mask; + c->range += (range1 - c->range) & one_mask; + *state = c->zero_state[(*state) + (256 & one_mask)]; + } refill(c); return one_mask & 1; -- cgit v1.2.3