PR #20607 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20607
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20607.patch

Suppresses implicit integer conversion narrowing warnings:
warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss 
of data

Those implicit conversions are abundant in ffmpeg's code base.
Additionally equivalent warnings are not enabled for GCC/Clang by
default, so they are mostly left unfixed.

Suppress reports about them to reduce noise in MSVC build log.

Signed-off-by: Kacper Michajłow <[email protected]>


From 56b683419f28f2685e2ba9febd69c7c969ba6d44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Thu, 25 Sep 2025 18:19:29 +0200
Subject: [PATCH] configure: suppress C4267 warnings from MSVC
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Suppresses implicit integer conversion narrowing warnings:
warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss 
of data

Those implicit conversions are abundant in ffmpeg's code base.
Additionally equivalent warnings are not enabled for GCC/Clang by
default, so they are mostly left unfixed.

Suppress reports about them to reduce noise in MSVC build log.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index c4e16ff97e..a01f0fbba4 100755
--- a/configure
+++ b/configure
@@ -5020,7 +5020,7 @@ msvc_flags(){
     for flag; do
         case $flag in
             -Wall)                echo -W3 -wd4018 -wd4146 -wd4244 -wd4305     
\
-                                       -wd4554 ;;
+                                       -wd4554 -wd4267 ;;
             -Wextra)              echo -W4 -wd4244 -wd4127 -wd4018 -wd4389     
\
                                        -wd4146 -wd4057 -wd4204 -wd4706 -wd4305 
\
                                        -wd4152 -wd4324 -we4013 -wd4100 -wd4214 
\
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to