]> git.videolan.org Git - x264.git/commitdiff
cosmetics: suppress warning on unused variables
authorLoren Merritt <pengvado@videolan.org>
Wed, 18 Jan 2006 04:29:18 +0000 (04:29 +0000)
committerLoren Merritt <pengvado@videolan.org>
Wed, 18 Jan 2006 04:29:18 +0000 (04:29 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@404 df754926-b1dd-0310-bc7b-ec298dee348c

common/common.h
common/predict.c
encoder/eval.c

index 25ee7777650347265677e83f557bda16e8cc50e8..6e3eb0473d4dc933c60b796b66778add8746dd22 100644 (file)
 #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
  ****************************************************************************/
index 0e25af8c7c0e71eb4ba65375877caa0dc5b090c8..e0c12701538d776d563a70367a3b043038543f80 100644 (file)
@@ -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) \
index 76b76bec52ecedf0c73ec5e38dd19f38f18f264e..eec1cc037486529c125fd619e3950e8cd184dda4 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <math.h>