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

Martin Storsjö martin at martin.st
Wed Oct 2 15:13:39 EEST 2024


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)



More information about the ffmpeg-devel mailing list