[CRIU][PATCH 1/3] zdtm: It's need turn off FORTIFY_SOURCE instead of use -Wno-unused-result option

vkonyashkin vkonyashkin at parallels.com
Thu Jul 19 03:55:05 EDT 2012


The -Wno-unused-result option looks to have been introduced in GCC 4.5.0.
So it's need turn off FORTIFY_SOURCE (compiler warn about unused results
in fortification mode) instead of use -Wno-unused-result to avoid error
in versions prior to 4.5.0.

Signed-off-by: Victor Konyashkin  <vkonyashkin at parallels.com>
---
 test/zdtm/lib/Makefile         |    2 +-
 test/zdtm/live/static/Makefile |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/zdtm/lib/Makefile b/test/zdtm/lib/Makefile
index 2be3011..0162e8c 100644
--- a/test/zdtm/lib/Makefile
+++ b/test/zdtm/lib/Makefile
@@ -1,4 +1,4 @@
-CFLAGS	= -g -O2 -Wall -Werror -Wno-unused-result
+CFLAGS	= -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
 
 LIB	= libzdtmtst.a
 
diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile
index 135bb23..07e92f2 100644
--- a/test/zdtm/live/static/Makefile
+++ b/test/zdtm/live/static/Makefile
@@ -1,7 +1,7 @@
 LIBDIR	= ../../lib
 LIB	= $(LIBDIR)/libzdtmtst.a
 override CPPFLAGS += -I$(LIBDIR)
-CFLAGS	= -g -O2 -Wall -Werror -Wno-unused-result
+CFLAGS	= -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
 
 TST_NOFILE	=				\
 		busyloop00			\
-- 
1.5.2.2



More information about the CRIU mailing list