[FFmpeg-devel] [PATCH] remove __attribute__((unused))

Reimar Doeffinger Reimar.Doeffinger
Sun May 13 14:34:23 CEST 2007


Hello,
attached patch would just remove them, since I don't really know what
their point is (probably just removing warnings?).
Probably a better fix would be to define attribute_unused just as it was
done for attribute_used.
Please say what you think.

Greetings,
Reimar Doeffinger
-------------- next part --------------
Index: libavcodec/h264.c
===================================================================
--- libavcodec/h264.c	(revision 9014)
+++ libavcodec/h264.c	(working copy)
@@ -1800,7 +1800,7 @@
     const int lt= src[-1-1*stride];
     LOAD_TOP_EDGE
     LOAD_LEFT_EDGE
-    const __attribute__((unused)) int unu= l3;
+    const int unu= l3;
 
     src[0+0*stride]=
     src[1+2*stride]=(lt + t0 + 1)>>1;
@@ -1823,7 +1823,7 @@
 static void pred4x4_vertical_left_c(uint8_t *src, uint8_t *topright, int stride){
     LOAD_TOP_EDGE
     LOAD_TOP_RIGHT_EDGE
-    const __attribute__((unused)) int unu= t7;
+    const int unu= t7;
 
     src[0+0*stride]=(t0 + t1 + 1)>>1;
     src[1+0*stride]=
@@ -1868,7 +1868,7 @@
     const int lt= src[-1-1*stride];
     LOAD_TOP_EDGE
     LOAD_LEFT_EDGE
-    const __attribute__((unused)) int unu= t3;
+    const int unu= t3;
 
     src[0+0*stride]=
     src[2+1*stride]=(lt + l0 + 1)>>1;
@@ -5655,7 +5655,7 @@
     return ctx + 4 * cat;
 }
 
-static const __attribute((used)) uint8_t last_coeff_flag_offset_8x8[63] = {
+static const uint8_t last_coeff_flag_offset_8x8[63] = {
     0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
     3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
Index: libavcodec/dvdata.h
===================================================================
--- libavcodec/dvdata.h	(revision 9014)
+++ libavcodec/dvdata.h	(working copy)
@@ -2534,7 +2534,7 @@
   {  31,  67, 103,  21,  57,  93,  11,  47,  83},
 };
 
-static const __attribute__((unused)) int dv_audio_frequency[3] = {
+static const int dv_audio_frequency[3] = {
     48000, 44100, 32000,
 };
 
Index: libavcodec/4xm.c
===================================================================
--- libavcodec/4xm.c	(revision 9014)
+++ libavcodec/4xm.c	(working copy)
@@ -555,7 +555,7 @@
     uint16_t *dst= (uint16_t*)f->current_picture.data[0];
     const int stride= f->current_picture.linesize[0]>>1;
     const unsigned int bitstream_size= get32(buf);
-    const int token_count __attribute__((unused)) = get32(buf + bitstream_size + 8);
+    const int token_count = get32(buf + bitstream_size + 8);
     unsigned int prestream_size= 4*get32(buf + bitstream_size + 4);
     uint8_t *prestream= buf + bitstream_size + 12;
 
Index: libavcodec/svq3.c
===================================================================
--- libavcodec/svq3.c	(revision 9014)
+++ libavcodec/svq3.c	(working copy)
@@ -183,8 +183,8 @@
 static void pred4x4_down_left_svq3_c(uint8_t *src, uint8_t *topright, int stride){
     LOAD_TOP_EDGE
     LOAD_LEFT_EDGE
-    const __attribute__((unused)) int unu0= t0;
-    const __attribute__((unused)) int unu1= l0;
+    const int unu0= t0;
+    const int unu1= l0;
 
     src[0+0*stride]=(l1 + t1)>>1;
     src[1+0*stride]=



More information about the ffmpeg-devel mailing list