]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-compiler.m4
CUPS v2.3.6 for CVE-2022-26691
[thirdparty/cups.git] / config-scripts / cups-compiler.m4
index 63ea1f47010fa67764eb1d7b1fdb186ce59cc0d1..604faf1b9f0484a9c7602ad0110f412101e65e2b 100644 (file)
@@ -1,7 +1,7 @@
 dnl
 dnl Compiler stuff for CUPS.
 dnl
-dnl Copyright 2007-2018 by Apple Inc.
+dnl Copyright 2007-2020 by Apple Inc.
 dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
 dnl
 dnl Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
@@ -169,22 +169,20 @@ if test -n "$GCC"; then
        fi
 
        # Add useful warning options for tracking down problems...
-       WARNING_OPTIONS="-Wall -Wno-format-y2k -Wunused -Wno-unused-result -Wsign-conversion"
+       WARNING_OPTIONS="-Wall -Wno-format-y2k -Wunused -Wno-unused-result -Wsign-conversion  -Wno-unused-but-set-variable  -Wno-unused-variable"
 
        # Test GCC version for certain warning flags since -Werror
        # doesn't trigger...
        gccversion=`$CC --version | head -1 | awk '{print $NF}'`
        case "$gccversion" in
-               1.* | 2.* | 3.* | 4.* | 5.* | 6.* | \(clang-*)
-                       ;;
-               *)
-                       WARNING_OPTIONS="$WARNING_OPTIONS -Wno-format-truncation -Wno-format-overflow -Wno-tautological-compare"
+        7.* | 8.* | 9.*)
+                       WARNING_OPTIONS="$WARNING_OPTIONS -Wno-format-truncation -Wno-tautological-compare"
                        ;;
        esac
 
        # Additional warning options for development testing...
        if test -d .git; then
-               WARNING_OPTIONS="-Werror -Wno-error=deprecated-declarations $WARNING_OPTIONS"
+               WARNING_OPTIONS="-Werror -Wno-error=deprecated-declarations -Wno-unknown-warning-option $WARNING_OPTIONS"
        fi
 else
        # Add vendor-specific compiler options...