diff --git a/CODING b/CODING index fef643d6b6..e0a81f89e4 100644 --- a/CODING +++ b/CODING @@ -351,4 +351,6 @@ rxkad/ticket5.c : format-truncation : inside included file v5der.c in the function _heim_time2generalizedtime, the two snprintf calls raise format-truncation warnings due to the - arithmetic on tm_year and tm_mon fields \ No newline at end of file + arithmetic on tm_year and tm_mon fields +lwp/process.c : dangling-pointer : Ignore the legitimate use of saving + the address of a stack variable diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 2805ab604e..482d5adfe4 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -631,6 +631,7 @@ CFLAGS_NOUNUSED= CFLAGS_NOOLDSTYLE= CFLAGS_NOIMPLICIT_FALLTHROUGH= CFLAGS_NOCAST_FUNCTION_TYPE= +CFLAGS_NODANGLING_POINTER= XCFLAGS_NOCHECKING="$XCFLAGS" if test "x$GCC" = "xyes"; then @@ -648,6 +649,8 @@ if test "x$GCC" = "xyes"; then [CFLAGS_NOIMPLICIT_FALLTHROUGH], [-Werror]) AX_APPEND_COMPILE_FLAGS([-Wno-cast-function-type], [CFLAGS_NOCAST_FUNCTION_TYPE], [-Werror]) + AX_APPEND_COMPILE_FLAGS([-Wno-dangling-pointer], + [CFLAGS_NODANGLING_POINTER], [-Werror]) AC_DEFINE(IGNORE_SOME_GCC_WARNINGS, 1, [define to disable some gcc warnings in warnings-as-errors mode]) else CFLAGS_NOSTRICT= @@ -732,6 +735,7 @@ AC_SUBST(CFLAGS_NOUNUSED) AC_SUBST(CFLAGS_NOOLDSTYLE) AC_SUBST(CFLAGS_NOIMPLICIT_FALLTHROUGH) AC_SUBST(CFLAGS_NOCAST_FUNCTION_TYPE) +AC_SUBST(CFLAGS_NODANGLING_POINTER) AC_SUBST(CFLAGS_WERROR) AC_SUBST(XCFLAGS64) AC_SUBST(XLDFLAGS) diff --git a/src/lwp/Makefile.in b/src/lwp/Makefile.in index 39d7402bed..7a5419602c 100644 --- a/src/lwp/Makefile.in +++ b/src/lwp/Makefile.in @@ -60,6 +60,7 @@ process.default.s: # Making process.o for $(SYS_NAME) # The files "process.s" and "process.S" may be used internally, # but will be removed after building the .o +CFLAGS_process.o = @CFLAGS_NODANGLING_POINTER@ process.o : process.default.s process.i386.s process.amd64.s process.c lwp.o @set -x; case "$(SYS_NAME)" in \ sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* | arm_linux* ) \