This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 7a8b3510e3 configure: probe warning options with -Werror
7a8b3510e3 is described below

commit 7a8b3510e356fd66341eca96056ddcbd83581ad4
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Sat Sep 26 06:43:15 2026 +0200
Commit:     James Almer <[email protected]>
CommitDate: Sat Sep 26 23:16:04 2026 +0000

    configure: probe warning options with -Werror
    
    GCC warns when a warning option is valid for another language and no -W
    option controls that warning, so after 45ec2cae19 dropped -Werror from
    the probe, -Wno-pointer-sign passed the C++ check and ended up in
    CXXFLAGS. Clang likewise warns about unknown warning options. -Werror
    covers both, so use it directly instead of the Clang specific -Werror=
    flags, and translate it to -WX for MSVC, which does not accept the GCC
    spelling.
    
    Using -Werror already includes more specific warnigns, so remove
    `unknown_warning_cflags` and just use -Werror.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 configure | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index f686b727cf..759cb8da10 100755
--- a/configure
+++ b/configure
@@ -5166,6 +5166,7 @@ msvc_common_flags(){
             # generic catch all at the bottom will print the original flag.
             -Wall)                ;;
             -Wextra)              ;;
+            -Werror)              echo -WX ;;
             -std=c*)              echo /std:${flag#-std=};;
             # Common flags
             -fomit-frame-pointer) ;;
@@ -7808,18 +7809,11 @@ fi
 
 enabled debug && add_allcflags -g"$debuglevel" && add_asflags -g"$debuglevel"
 
-for lang in c cxx; do
-    test_${lang}flags -Werror=unused-command-line-argument &&
-        append unknown_warning_${lang}flags 
"-Werror=unused-command-line-argument"
-    test_${lang}flags -Werror=unknown-warning-option &&
-        append unknown_warning_${lang}flags "-Werror=unknown-warning-option"
-done
-
 check_warning(){
     warning_flag=$1
     flag_to_add=${2:-$1}
-    test_cflags $unknown_warning_cflags $warning_flag && add_cflags 
$flag_to_add
-    test_cxxflags $unknown_warning_cxxflags $warning_flag && add_cxxflags 
$flag_to_add
+    test_cflags -Werror $warning_flag && add_cflags $flag_to_add
+    test_cxxflags -Werror $warning_flag && add_cxxflags $flag_to_add
 }
 
 check_disable_warning(){
@@ -7829,7 +7823,7 @@ check_disable_warning(){
 
 check_c_warning(){
     warning_flag=$1
-    test_cflags $unknown_warning_cflags $warning_flag && add_cflags 
$warning_flag
+    test_cflags -Werror $warning_flag && add_cflags $warning_flag
 }
 
 # add some useful compiler flags if supported
@@ -7876,7 +7870,7 @@ check_disable_warning 
-Wno-microsoft-enum-forward-reference
 
 check_disable_warning_headers(){
     warning_flag=-W${1#-Wno-}
-    test_cflags $unknown_warning_cflags $warning_flag && add_cflags_headers $1
+    test_cflags -Werror $warning_flag && add_cflags_headers $1
 }
 
 check_disable_warning_headers -Wno-deprecated-declarations

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to