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
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to