[mm-common] mm-warnings.m4: Fix MM_ARG_ENABLE_WARNINGS for C++11
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mm-common] mm-warnings.m4: Fix MM_ARG_ENABLE_WARNINGS for C++11
- Date: Thu, 19 Nov 2015 10:57:59 +0000 (UTC)
commit 8fe12c7dad6d0a17a520fba6739b6355ae8d2409
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Sun Nov 15 18:41:42 2015 +0100
mm-warnings.m4: Fix MM_ARG_ENABLE_WARNINGS for C++11
* macros/mm-warnings.m4: Don't compare a pointer with 0 in the test program.
It does not work well with the -Wzero-as-null-pointer-constant option.
Bug #757979.
macros/mm-warnings.m4 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/macros/mm-warnings.m4 b/macros/mm-warnings.m4
index ca2645d..840a4fc 100644
--- a/macros/mm-warnings.m4
+++ b/macros/mm-warnings.m4
@@ -95,7 +95,7 @@ AS_IF([test "x$mm_warning_flags" != x],
# Keep in mind that the dummy source must be devoid of any
# problems that might cause diagnostics.
AC_LANG_CONFTEST([AC_LANG_SOURCE([[
-int main(int argc, char** argv) { return (argv != 0) ? argc : 0; }
+int main(int argc, char** argv) { return !argv ? 0 : argc; }
]])])
for mm_flag in $mm_warning_flags
do
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]