Rémi Bernon : configure: Re-enable warnings disabled with Wno-format.

Alexandre Julliard julliard at winehq.org
Thu Feb 13 15:36:31 CST 2020


Module: wine
Branch: master
Commit: 453da26df3f9cb5d4a37af42acc2ff2fe500ca1f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=453da26df3f9cb5d4a37af42acc2ff2fe500ca1f

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Feb 11 19:09:36 2020 +0100

configure: Re-enable warnings disabled with Wno-format.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure    | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac |  4 +++-
 2 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index dd2856d2ef..cb85fb8b8f 100755
--- a/configure
+++ b/configure
@@ -10370,6 +10370,68 @@ fi
 $as_echo "$ac_cv_crosscflags__Wno_format" >&6; }
 if test "x$ac_cv_crosscflags__Wno_format" = xyes; then :
   EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Wno-format"
+fi
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -Wformat-overflow" >&5
+$as_echo_n "checking whether the cross-compiler supports -Wformat-overflow... " >&6; }
+if ${ac_cv_crosscflags__Wformat_overflow+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_wine_try_cflags_saved=$CFLAGS
+ac_wine_try_cflags_saved_cc=$CC
+ac_wine_try_cflags_saved_exeext=$ac_exeext
+CFLAGS="$CFLAGS -Wformat-overflow"
+CC="$CROSSCC"
+ac_exeext=".exe"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(int argc, char **argv) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_crosscflags__Wformat_overflow=yes
+else
+  ac_cv_crosscflags__Wformat_overflow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+CFLAGS=$ac_wine_try_cflags_saved
+CC=$ac_wine_try_cflags_saved_cc
+ac_exeext=$ac_wine_try_cflags_saved_exeext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crosscflags__Wformat_overflow" >&5
+$as_echo "$ac_cv_crosscflags__Wformat_overflow" >&6; }
+if test "x$ac_cv_crosscflags__Wformat_overflow" = xyes; then :
+  EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Wformat-overflow"
+fi
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -Wnonnull" >&5
+$as_echo_n "checking whether the cross-compiler supports -Wnonnull... " >&6; }
+if ${ac_cv_crosscflags__Wnonnull+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_wine_try_cflags_saved=$CFLAGS
+ac_wine_try_cflags_saved_cc=$CC
+ac_wine_try_cflags_saved_exeext=$ac_exeext
+CFLAGS="$CFLAGS -Wnonnull"
+CC="$CROSSCC"
+ac_exeext=".exe"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(int argc, char **argv) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_crosscflags__Wnonnull=yes
+else
+  ac_cv_crosscflags__Wnonnull=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+CFLAGS=$ac_wine_try_cflags_saved
+CC=$ac_wine_try_cflags_saved_cc
+ac_exeext=$ac_wine_try_cflags_saved_exeext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crosscflags__Wnonnull" >&5
+$as_echo "$ac_cv_crosscflags__Wnonnull" >&6; }
+if test "x$ac_cv_crosscflags__Wnonnull" = xyes; then :
+  EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -Wnonnull"
 fi ;;
         esac
 
diff --git a/configure.ac b/configure.ac
index 083369fdd7..b3389b796b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1063,7 +1063,9 @@ then
 
         case $host_cpu in
           *i[[3456789]]86*) WINE_TRY_CROSSCFLAGS([-fno-omit-frame-pointer]) ;;
-          x86_64) WINE_TRY_CROSSCFLAGS([-Wno-format]) ;;
+          x86_64) WINE_TRY_CROSSCFLAGS([-Wno-format])
+                  WINE_TRY_CROSSCFLAGS([-Wformat-overflow])
+                  WINE_TRY_CROSSCFLAGS([-Wnonnull]) ;;
         esac
 
         dnl Default to dwarf-2 debug info




More information about the wine-cvs mailing list