From 92f8b54657d98db77e4851872c15287c6ca41848 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 16 Nov 2021 17:18:28 +0100 Subject: [PATCH] vaapi: libs: Use unsized arrays as parameters. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Instead of defining a sized array for function signature, use it unsized (a pointer alias, basically). In this way clang warning is silenced: warning: ‘fill_profiles’ accessing 64 bytes in a region of size 12 [-Wstringop-overflow=] Part-of: --- subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h264.c | 4 ++-- subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h265.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h264.c index 01b1797..490528c 100644 --- a/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h264.c +++ b/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h264.c @@ -1435,7 +1435,7 @@ get_sps (GstVaapiDecoderH264 * decoder) } static void -fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr, +fill_profiles (GstVaapiProfile profiles[], guint * n_profiles_ptr, GstVaapiProfile profile) { guint n_profiles = *n_profiles_ptr; @@ -1453,7 +1453,7 @@ fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr, /* Fills in compatible profiles for MVC decoding */ static void -fill_profiles_mvc (GstVaapiDecoderH264 * decoder, GstVaapiProfile profiles[16], +fill_profiles_mvc (GstVaapiDecoderH264 * decoder, GstVaapiProfile profiles[], guint * n_profiles_ptr, guint dpb_size) { const gchar *const vendor_string = diff --git a/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h265.c b/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h265.c index ad25888..218a25b 100644 --- a/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h265.c +++ b/subprojects/gstreamer-vaapi/gst-libs/gst/vaapi/gstvaapidecoder_h265.c @@ -1073,7 +1073,7 @@ gst_vaapi_decoder_h265_reset (GstVaapiDecoder * base_decoder) } static void -fill_profiles (GstVaapiProfile profiles[16], guint * n_profiles_ptr, +fill_profiles (GstVaapiProfile profiles[], guint * n_profiles_ptr, GstVaapiProfile profile) { guint n_profiles = *n_profiles_ptr; -- 2.7.4