[FFmpeg-devel] [PATCH] checkasm: Remove unnecessary const on scalar parameters

Martin Storsjö martin at martin.st
Wed Dec 20 10:06:53 EET 2023


On Mon, 18 Dec 2023, Martin Storsjö wrote:

> The ffmpeg coding style doesn't usually use const on scalar
> parameters (or on the pointer values - as opposed to the type
> that is pointed to, where it has a semantic meaning), contrary
> to the dav1d coding style (where this was imported from).
>
> This avoids warnings about differences in the type signatures
> between declaration and definition of this function, with older
> versions of MSVC.
>
> The issue was observed with one version of MSVC 2017,
> 19.16.27024.1, with warnings like these:
>
>    src/tests/checkasm/checkasm.c(969): warning C4028: formal parameter 3 different from declaration

FWIW, newer versions of MSVC don't warn about this - the warning is bogus 
indeed. But these const markings are unnecessary here anyway, and aren't 
endorsed in the ffmpeg coding style.

Anyway, this patch got generally favourable response on irc yesterday, so 
I'll push it today.

// Martin


More information about the ffmpeg-devel mailing list