Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] configure: suppress C4267 warnings from MSVC (PR #20607)
@ 2025-09-25 16:24 Kacper Michajłow via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: Kacper Michajłow via ffmpeg-devel @ 2025-09-25 16:24 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Kacper Michajłow

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 <kasper93@gmail.com>


From 56b683419f28f2685e2ba9febd69c7c969ba6d44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
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 <kasper93@gmail.com>
---
 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 -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-25 16:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-25 16:24 [FFmpeg-devel] [PATCH] configure: suppress C4267 warnings from MSVC (PR #20607) Kacper Michajłow via ffmpeg-devel

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ http://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git