We do not enable warnings about unused function parameters, so
there is little point in trying to silence those warnings.
Besides, some fringe compilers choke on these attributes.
---

This is a more complete version of Rémi's patch.

 libavcodec/dxva2_h264.c     |    3 +--
 libavcodec/dxva2_mpeg2.c    |    4 ++--
 libavcodec/dxva2_vc1.c      |    3 +--
 libavcodec/vaapi_h264.c     |    6 +++---
 libavcodec/vaapi_mpeg2.c    |    4 +++-
 libavcodec/vaapi_mpeg4.c    |    4 +++-
 libavcodec/vaapi_vc1.c      |    3 ++-
 libavcodec/vda_h264.c       |    4 ++--
 libavcodec/vdpau.c          |    3 +--
 libavcodec/vdpau_internal.h |    4 ++--
 libavcodec/vdpau_mpeg4.c    |    6 +++---
 11 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 2fd0767..b02534c 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -371,8 +371,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext 
*avctx,
 
 
 static int start_frame(AVCodecContext *avctx,
-                       av_unused const uint8_t *buffer,
-                       av_unused uint32_t size)
+                       const uint8_t *buffer, uint32_t size)
 {
     const H264Context *h = avctx->priv_data;
     struct dxva_context *ctx = avctx->hwaccel_context;
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index fa6ae7b..90faa15 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -204,8 +204,8 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext 
*avctx,
 }
 
 static int start_frame(AVCodecContext *avctx,
-                       av_unused const uint8_t *buffer,
-                       av_unused uint32_t size)
+                       const uint8_t *buffer,
+                       uint32_t size)
 {
     const struct MpegEncContext *s = avctx->priv_data;
     struct dxva_context *ctx = avctx->hwaccel_context;
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 5aed2f3..cec65a5 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -209,8 +209,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext 
*avctx,
 }
 
 static int start_frame(AVCodecContext *avctx,
-                       av_unused const uint8_t *buffer,
-                       av_unused uint32_t size)
+                       const uint8_t *buffer, uint32_t size)
 {
     const VC1Context *v = avctx->priv_data;
     struct dxva_context *ctx = avctx->hwaccel_context;
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 4ffc7d8..e140383 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -219,9 +219,9 @@ static void fill_vaapi_plain_pred_weight_table(H264Context  
 *h,
 }
 
 /** Initialize and start decoding a frame with VA API. */
-static int start_frame(AVCodecContext          *avctx,
-                       av_unused const uint8_t *buffer,
-                       av_unused uint32_t       size)
+static int start_frame(AVCodecContext *avctx,
+                       const uint8_t  *buffer,
+                       uint32_t        size)
 {
     H264Context * const h = avctx->priv_data;
     MpegEncContext * const s = &h->s;
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index cfe5d3a..6d6ab89 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -36,7 +36,9 @@ static inline int mpeg2_get_is_frame_start(MpegEncContext *s)
     return s->first_field || s->picture_structure == PICT_FRAME;
 }
 
-static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const 
uint8_t *buffer, av_unused uint32_t size)
+static int vaapi_mpeg2_start_frame(AVCodecContext *avctx,
+                                   const uint8_t *buffer,
+                                   uint32_t size)
 {
     struct MpegEncContext * const s = avctx->priv_data;
     struct vaapi_context * const vactx = avctx->hwaccel_context;
diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c
index 7d9ffd7..5c0f2e9 100644
--- a/libavcodec/vaapi_mpeg4.c
+++ b/libavcodec/vaapi_mpeg4.c
@@ -39,7 +39,9 @@ static int mpeg4_get_intra_dc_vlc_thr(MpegEncContext *s)
     return 0;
 }
 
-static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const 
uint8_t *buffer, av_unused uint32_t size)
+static int vaapi_mpeg4_start_frame(AVCodecContext *avctx,
+                                   const uint8_t *buffer,
+                                   uint32_t size)
 {
     MpegEncContext * const s = avctx->priv_data;
     struct vaapi_context * const vactx = avctx->hwaccel_context;
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c
index 4a98ba7..28b64d0 100644
--- a/libavcodec/vaapi_vc1.c
+++ b/libavcodec/vaapi_vc1.c
@@ -143,7 +143,8 @@ static inline void vc1_pack_bitplanes(uint8_t *bitplane, 
int n, const uint8_t *f
     bitplane[bitplane_index] = (bitplane[bitplane_index] << 4) | v;
 }
 
-static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const 
uint8_t *buffer, av_unused uint32_t size)
+static int vaapi_vc1_start_frame(AVCodecContext *avctx, const uint8_t *buffer,
+                                 uint32_t size)
 {
     VC1Context * const v = avctx->priv_data;
     MpegEncContext * const s = &v->s;
diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
index 34fcd3c..8d1022a 100644
--- a/libavcodec/vda_h264.c
+++ b/libavcodec/vda_h264.c
@@ -198,8 +198,8 @@ static int vda_sync_decode(struct vda_context *vda_ctx)
 
 
 static int start_frame(AVCodecContext *avctx,
-                       av_unused const uint8_t *buffer,
-                       av_unused uint32_t size)
+                       const uint8_t *buffer,
+                       uint32_t size)
 {
     struct vda_context *vda_ctx         = avctx->hwaccel_context;
 
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 851c7cb..d4ad0d6 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -39,8 +39,7 @@
  */
 
 int ff_vdpau_common_start_frame(AVCodecContext *avctx,
-                                av_unused const uint8_t *buffer,
-                                av_unused uint32_t size)
+                                const uint8_t *buffer, uint32_t size)
 {
     AVVDPAUContext *hwctx = avctx->hwaccel_context;
 
diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h
index 87c94c8..c740d94 100644
--- a/libavcodec/vdpau_internal.h
+++ b/libavcodec/vdpau_internal.h
@@ -34,8 +34,8 @@ static inline uintptr_t ff_vdpau_get_surface_id(Picture *pic)
 }
 
 int ff_vdpau_common_start_frame(AVCodecContext *avctx,
-                                av_unused const uint8_t *buffer,
-                                av_unused uint32_t size);
+                                const uint8_t *buffer,
+                                uint32_t size);
 int ff_vdpau_common_end_frame(AVCodecContext *avctx);
 int ff_vdpau_add_buffer(AVCodecContext *avctx,
                         const uint8_t *buf, uint32_t buf_size);
diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c
index 706e2b6..11ae138 100644
--- a/libavcodec/vdpau_mpeg4.c
+++ b/libavcodec/vdpau_mpeg4.c
@@ -78,9 +78,9 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx,
     return ff_vdpau_add_buffer(avctx, buffer, size);
 }
 
-static int vdpau_mpeg4_decode_slice(av_unused AVCodecContext *avctx,
-                                    av_unused const uint8_t *buffer,
-                                    av_unused uint32_t size)
+static int vdpau_mpeg4_decode_slice(AVCodecContext *avctx,
+                                    const uint8_t *buffer,
+                                    uint32_t size)
 {
      return 0;
 }
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to