diff mbox series

[FFmpeg-devel] fixed_dsp: add missing av_restrict qualifiers

Message ID DB6PR07MB317593BE27D57B5AE48699A1A6509@DB6PR07MB3175.eurprd07.prod.outlook.com
State Accepted
Commit a11e745b97dfc8117bac0cf7049061291195d02c
Headers show
Series [FFmpeg-devel] fixed_dsp: add missing av_restrict qualifiers | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Johannes Kauffmann Sept. 24, 2022, 10:41 p.m. UTC
The butterflies_fixed function pointer declaration specifies av_restrict
for the first two pointer arguments. So the corresponding function
definitions should honor this declaration.

MSVC emits warning C4113 for this.
---
 libavutil/fixed_dsp.c          | 2 +-
 libavutil/x86/fixed_dsp_init.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Anton Khirnov Oct. 4, 2022, 8:56 a.m. UTC | #1
Quoting Johannes Kauffmann (2022-09-25 00:41:18)
> The butterflies_fixed function pointer declaration specifies av_restrict
> for the first two pointer arguments. So the corresponding function
> definitions should honor this declaration.
> 
> MSVC emits warning C4113 for this.
> ---
>  libavutil/fixed_dsp.c          | 2 +-
>  libavutil/x86/fixed_dsp_init.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Makes sense, will push.
diff mbox series

Patch

diff --git a/libavutil/fixed_dsp.c b/libavutil/fixed_dsp.c
index 154f3bc2d3..30eaa94bb7 100644
--- a/libavutil/fixed_dsp.c
+++ b/libavutil/fixed_dsp.c
@@ -135,7 +135,7 @@  static int scalarproduct_fixed_c(const int *v1, const int *v2, int len)
     return (int)(p >> 31);
 }
 
-static void butterflies_fixed_c(int *v1s, int *v2, int len)
+static void butterflies_fixed_c(int *av_restrict v1s, int *av_restrict v2, int len)
 {
     int i;
     unsigned int *v1 = v1s;
diff --git a/libavutil/x86/fixed_dsp_init.c b/libavutil/x86/fixed_dsp_init.c
index 303a2eb922..d3f4b2e325 100644
--- a/libavutil/x86/fixed_dsp_init.c
+++ b/libavutil/x86/fixed_dsp_init.c
@@ -23,7 +23,7 @@ 
 #include "libavutil/fixed_dsp.h"
 #include "cpu.h"
 
-void ff_butterflies_fixed_sse2(int *src0, int *src1, int len);
+void ff_butterflies_fixed_sse2(int *av_restrict src0, int *av_restrict src1, int len);
 
 av_cold void ff_fixed_dsp_init_x86(AVFixedDSPContext *fdsp)
 {