[FFmpeg-cvslog] Mark a number of variables only used in av_dlog() calls as av_unused.

Diego Biurrun git at videolan.org
Sun May 6 22:19:01 CEST 2012


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Thu Apr 19 14:48:16 2012 +0200| [30b1961c662ffba8eb430682af24f823e80cd345] | committer: Diego Biurrun

Mark a number of variables only used in av_dlog() calls as av_unused.

This fixes a number of unused-but-set gcc warnings.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=30b1961c662ffba8eb430682af24f823e80cd345
---

 libavcodec/wmalosslessdec.c |    3 ++-
 libavformat/mov.c           |    6 ++++--
 libavformat/nsvdec.c        |    5 +++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index d4c9c5a..cb7f667 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -22,6 +22,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/attributes.h"
 #include "avcodec.h"
 #include "internal.h"
 #include "get_bits.h"
@@ -1041,7 +1042,7 @@ static int decode_frame(WmallDecodeCtx *s)
     /* no idea what these are for, might be the number of samples
        that need to be skipped at the beginning or end of a stream */
     if (get_bits1(gb)) {
-        int skip;
+        int av_unused skip;
 
         /* usually true for the first frame */
         if (get_bits1(gb)) {
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 04deef6..35c9b6e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -25,6 +25,7 @@
 //#define DEBUG
 //#define MOV_EXPORT_ALL_METADATA
 
+#include "libavutil/attributes.h"
 #include "libavutil/audioconvert.h"
 #include "libavutil/intreadwrite.h"
 #include "libavutil/intfloat.h"
@@ -596,8 +597,9 @@ static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 {
     AVStream *st;
-    uint8_t version;
-    uint32_t flags, layout_tag, bitmap, num_descr, label_mask;
+    uint8_t av_unused version;
+    uint32_t av_unused flags;
+    uint32_t layout_tag, bitmap, num_descr, label_mask;
     int i;
 
     if (c->fc->nb_streams < 1)
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index 1a160c5..24e823e 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/attributes.h"
 #include "libavutil/mathematics.h"
 #include "avformat.h"
 #include "internal.h"
@@ -273,7 +274,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s)
 {
     NSVContext *nsv = s->priv_data;
     AVIOContext *pb = s->pb;
-    unsigned int file_size;
+    unsigned int av_unused file_size;
     unsigned int size;
     int64_t duration;
     int strings_size;
@@ -595,7 +596,7 @@ null_chunk_retry:
     av_dlog(s, "NSV CHUNK %d aux, %u bytes video, %d bytes audio\n", auxcount, vsize, asize);
     /* skip aux stuff */
     for (i = 0; i < auxcount; i++) {
-        uint32_t auxtag;
+        uint32_t av_unused auxtag;
         auxsize = avio_rl16(pb);
         auxtag = avio_rl32(pb);
         av_dlog(s, "NSV aux data: '%c%c%c%c', %d bytes\n",



More information about the ffmpeg-cvslog mailing list