From 61b57afb7b614ab09a0508c4c53ca411f4f675f8 Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Wed, 18 Jan 2006 04:29:18 +0000 Subject: [PATCH] cosmetics: suppress warning on unused variables git-svn-id: svn://svn.videolan.org/x264/trunk@404 df754926-b1dd-0310-bc7b-ec298dee348c --- common/common.h | 6 ++++++ common/predict.c | 10 +++++----- encoder/eval.c | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/common/common.h b/common/common.h index 25ee7777..6e3eb047 100644 --- a/common/common.h +++ b/common/common.h @@ -49,6 +49,12 @@ #define XCHG(type,a,b) { type t = a; a = b; b = t; } #define FIX8(f) ((int)(f*(1<<8)+.5)) +#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) +#define UNUSED __attribute__((unused)) +#else +#define UNUSED +#endif + /**************************************************************************** * Includes ****************************************************************************/ diff --git a/common/predict.c b/common/predict.c index 0e25af8c..e0c12701 100644 --- a/common/predict.c +++ b/common/predict.c @@ -448,19 +448,19 @@ static void predict_4x4_v( uint8_t *src, int i_stride ) const int l0 = src[-1+0*i_stride]; \ const int l1 = src[-1+1*i_stride]; \ const int l2 = src[-1+2*i_stride]; \ - const int l3 = src[-1+3*i_stride]; + UNUSED const int l3 = src[-1+3*i_stride]; #define PREDICT_4x4_LOAD_TOP \ const int t0 = src[0-1*i_stride]; \ const int t1 = src[1-1*i_stride]; \ const int t2 = src[2-1*i_stride]; \ - const int t3 = src[3-1*i_stride]; + UNUSED const int t3 = src[3-1*i_stride]; #define PREDICT_4x4_LOAD_TOP_RIGHT \ const int t4 = src[4-1*i_stride]; \ const int t5 = src[5-1*i_stride]; \ const int t6 = src[6-1*i_stride]; \ - const int t7 = src[7-1*i_stride]; + UNUSED const int t7 = src[7-1*i_stride]; static void predict_4x4_ddl( uint8_t *src, int i_stride ) @@ -640,7 +640,7 @@ static void predict_4x4_hu( uint8_t *src, int i_stride ) const int l0 = ((i_neighbor&MB_TOPLEFT ? SRC(-1,-1) : SRC(-1,0)) \ + 2*SRC(-1,0) + SRC(-1,1) + 2) >> 2; \ PL(1) PL(2) PL(3) PL(4) PL(5) PL(6) \ - const int l7 = (SRC(-1,6) + 3*SRC(-1,7) + 2) >> 2; + UNUSED const int l7 = (SRC(-1,6) + 3*SRC(-1,7) + 2) >> 2; #define PT(x) \ const int t##x = (SRC(x-1,-1) + 2*SRC(x,-1) + SRC(x+1,-1) + 2) >> 2; @@ -648,7 +648,7 @@ static void predict_4x4_hu( uint8_t *src, int i_stride ) const int t0 = ((i_neighbor&MB_TOPLEFT ? SRC(-1,-1) : SRC(0,-1)) \ + 2*SRC(0,-1) + SRC(1,-1) + 2) >> 2; \ PT(1) PT(2) PT(3) PT(4) PT(5) PT(6) \ - const int t7 = ((i_neighbor&MB_TOPRIGHT ? SRC(8,-1) : SRC(7,-1)) \ + UNUSED const int t7 = ((i_neighbor&MB_TOPRIGHT ? SRC(8,-1) : SRC(7,-1)) \ + 2*SRC(7,-1) + SRC(6,-1) + 2) >> 2; \ #define PTR(x) \ diff --git a/encoder/eval.c b/encoder/eval.c index 76b76bec..eec1cc03 100644 --- a/encoder/eval.c +++ b/encoder/eval.c @@ -27,6 +27,7 @@ */ #include +#include #include #include -- 2.47.3