[FFmpeg-devel] [PATCH] configure: Enable -Wno-implicit-const-int-float-conversion if available

Martin Storsjö martin at martin.st
Fri Oct 4 18:15:45 EEST 2024


On Wed, 2 Oct 2024, Martin Storsjö wrote:

> This silences a lot of compile warnings (around 160 instances at least), when
> compiling with Clang.
>
> These warnings look like this:
>
>    libavformat/http.c:176:133: warning: implicit conversion from 'long long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-const-int-float-conversion]
>      176 |     { "end_offset", "try to limit the request to bytes preceding this offset", OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D },
>          |     ~                                                                                                                               ^~~~~~~~~
> ---
> configure | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/configure b/configure
> index dc1b9b2bea..2b0ba07771 100755
> --- a/configure
> +++ b/configure
> @@ -7459,6 +7459,7 @@ check_disable_warning -Wno-pointer-sign
> check_disable_warning -Wno-unused-const-variable
> check_disable_warning -Wno-bool-operation
> check_disable_warning -Wno-char-subscripts
> +check_disable_warning -Wno-implicit-const-int-float-conversion
>
> check_disable_warning_headers(){
>     warning_flag=-W${1#-Wno-}
> -- 
> 2.39.5 (Apple Git-154)

I'll push this one soon as well, if there's no good ideas (with a 
volunteered implementation) to get around the actual issue that the 
compiler warns about.

// Martin


More information about the ffmpeg-devel mailing list