diff mbox series

[FFmpeg-devel] swscale/x86/rgb2rgb: fix a Wlto-type-mismatch warning

Message ID 20230716123946.4813-1-alice@ptrc.gay
State New
Headers show
Series [FFmpeg-devel] swscale/x86/rgb2rgb: fix a Wlto-type-mismatch warning | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

psykose July 16, 2023, 12:39 p.m. UTC
From: psykose <alice@ayaya.dev>

fixes a warning when building with --enable-lto:
libswscale/x86/swscale.c:323:1: warning: type of 'ff_nv12ToUV_avx' does not match original declaration [-Wlto-type-mismatch]
  323 | INPUT_FUNCS(avx);
      | ^
libswscale/x86/rgb2rgb_template.c:1821:6: note: type mismatch in parameter 8
 1821 | void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
      |      ^
libswscale/x86/rgb2rgb_template.c:1821:6: note: 'ff_nv12ToUV_avx' was previously declared here

this is because INPUT_UV_FUNC in swscale.c has an 8th void * parameter,
so match the declaration and pass NULL for it
---
 libswscale/x86/rgb2rgb_template.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c
index 4aba25dd51..f6c843e4f2 100644
--- a/libswscale/x86/rgb2rgb_template.c
+++ b/libswscale/x86/rgb2rgb_template.c
@@ -1823,7 +1823,7 @@  void RENAME(ff_nv12ToUV)(uint8_t *dstU, uint8_t *dstV,
                          const uint8_t *src1,
                          const uint8_t *src2,
                          int w,
-                         uint32_t *unused2);
+                         uint32_t *unused2, void *opq);
 static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t *dst2,
                                       int width, int height, int srcStride,
                                       int dst1Stride, int dst2Stride)
@@ -1831,7 +1831,7 @@  static void RENAME(deinterleaveBytes)(const uint8_t *src, uint8_t *dst1, uint8_t
     int h;
 
     for (h = 0; h < height; h++) {
-        RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL);
+        RENAME(ff_nv12ToUV)(dst1, dst2, NULL, src, NULL, width, NULL, NULL);
         src  += srcStride;
         dst1 += dst1Stride;
         dst2 += dst2Stride;