cmdutils: Mark conditionally used variable as av_unused
authorDiego Biurrun <diego@biurrun.de>
Mon, 22 May 2017 14:27:51 +0000 (16:27 +0200)
committerDiego Biurrun <diego@biurrun.de>
Sat, 3 Jun 2017 17:34:08 +0000 (19:34 +0200)
avtools/cmdutils.c:1234:28: warning: unused variable ‘pix_fmt’ [-Wunused-variable]

avtools/cmdutils.c

index b0445eb..727e283 100644 (file)
@@ -35,6 +35,7 @@
 #include "libavdevice/avdevice.h"
 #include "libavresample/avresample.h"
 #include "libswscale/swscale.h"
+#include "libavutil/attributes.h"
 #include "libavutil/avassert.h"
 #include "libavutil/avstring.h"
 #include "libavutil/mathematics.h"
@@ -1231,7 +1232,7 @@ int show_pix_fmts(void *optctx, const char *opt, const char *arg)
 #endif
 
     while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) {
-        enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(pix_desc);
+        enum AVPixelFormat av_unused pix_fmt = av_pix_fmt_desc_get_id(pix_desc);
         printf("%c%c%c%c%c %-16s       %d            %2d\n",
                sws_isSupportedInput (pix_fmt)              ? 'I' : '.',
                sws_isSupportedOutput(pix_fmt)              ? 'O' : '.',