[sword-svn] r3433 - in trunk: . include
scribe at crosswire.org
scribe at crosswire.org
Wed Aug 17 06:25:41 MST 2016
Author: scribe
Date: 2016-08-17 06:25:41 -0700 (Wed, 17 Aug 2016)
New Revision: 3433
Modified:
trunk/configure.ac
trunk/include/swobject.h
Log:
Removed pragmas from swobject.h and included conditional include in
build system, per Jaak's good suggestion
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2016-08-17 00:50:58 UTC (rev 3432)
+++ trunk/configure.ac 2016-08-17 13:25:41 UTC (rev 3433)
@@ -354,6 +354,23 @@
if test "$V4" -le 9 ; then V4=00$V4 ; elif test "$V4" -le 99 ; then V4=0$V4 ; fi
SWORD_VERSION_NUM=$V1$V2$V3$V4
+echo "checking compiler warnings"
+m4_foreach(WARN_CHECK, [-Wno-address, -Wno-nonnull-compare],
+[
+ saved_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS WARN_CHECK"
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],[WARNING_CHECK=WARN_CHECK],[WARNING_CHECK=;])
+ AC_LANG_POP([C++])
+ CXXFLAGS="$saved_CXXFLAGS"
+ echo "WARNING_CHECK: $WARNING_CHECK"
+ WARNINGS_OFF="$WARNINGS_OFF $WARNING_CHECK"
+])
+
+echo "WARNINGS_OFF: $WARNINGS_OFF"
+AM_CXXFLAGS="$AM_CXXFLAGS $WARNINGS_OFF"
+
+
AC_SUBST(SWORD_VERSION_NUM)
AC_SUBST(SWORD_VERSION_STR)
AC_SUBST(SWORD_VERSION_MAJOR)
Modified: trunk/include/swobject.h
===================================================================
--- trunk/include/swobject.h 2016-08-17 00:50:58 UTC (rev 3432)
+++ trunk/include/swobject.h 2016-08-17 13:25:41 UTC (rev 3433)
@@ -27,8 +27,6 @@
#include <defs.h>
SWORD_NAMESPACE_START
-#pragma GCC diagnostic warning "-Waddress"
-#pragma GCC diagnostic warning "-Wnonnull-compare"
#define SWDYNAMIC_CAST(className, object) (className *)((object)?((object->getClass()->isAssignableFrom(#className))?object:0):0)
/**
More information about the sword-cvs
mailing list