From: Andrew Deason Date: Mon, 22 Nov 2010 02:20:42 +0000 (-0500) Subject: Utilize --enable-warnings for SUNWspro X-Git-Tag: openafs-devel-1_7_1~1189 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=a414636a667c395fc0af8270726f238a392fb5d7 Utilize --enable-warnings for SUNWspro Add the necessary options for the Solaris Studio compiler to enable more warnings, when specified in the ./configure invocation. Change-Id: I30e2a4a4bddad6beb4c50c3e10775c09916bf0df Reviewed-on: http://gerrit.openafs.org/3367 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index cd25b99..7a6ea2e 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -1065,6 +1065,22 @@ if test "x$GCC" = "xyes"; then AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode]) fi fi +else + case $AFS_SYSNAME in + sun*_51?) + # Solaris Studio + warn_common="-v -errfmt=error -errtags=yes -erroff=E_ATTRIBUTE_UNKNOWN,E_END_OF_LOOP_CODE_NOT_REACHED" + if test "x$enable_warnings" = "xyes" ; then + XCFLAGS="${XCFLAGS} $warn_common" + fi + if test "x$enable_checking" != "xno" ; then + XCFLAGS="${XCFLAGS} $warn_common -errwarn=%all" + if test "x$enable_checking" != "xall" ; then + CFLAGS_NOERROR="-errwarn=%none" + fi + fi + ;; + esac fi dnl horribly cheating, assuming double / is ok.