fix error by [-Werror=coverage-mismatch] 11/113111/1
authorDongkyun, Son <dongkyun.s@samsung.com>
Tue, 1 Nov 2016 10:43:35 +0000 (19:43 +0900)
committerDonghun Kwak <dh0128.kwak@samsung.com>
Mon, 6 Feb 2017 06:24:53 +0000 (22:24 -0800)
conftest.c: In function 'main':
conftest.c:46:1: error: the control flow of function 'main' does not
match its profile data (counter 'arcs') [-Werror=coverage-mismatch]

-Wno-coverage-mismatch
Warn if feedback profiles do not match when using the -fprofile-use
option. If a source file is changed between compiling with -fprofile-gen
and with -fprofile-use, the files with the profile feedback can fail to
match the source file and GCC cannot use the profile feedback
information. By default, this warning is enabled and is treated as an
error. -Wno-coverage-mismatch can be used to disable the warning or
-Wno-error=coverage-mismatch can be used to disable the error. Disabling
the error for this warning can result in poorly optimized code and is
useful only in the case of very minor changes such as bug fixes to an
existing code-base. Completely disabling the warning is not recommended.

Change-Id: I7b48d8c3d3a05a5c4c83a8d32f4304a0797af2c2
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
packaging/xz.spec

index 23d7930..5090067 100644 (file)
@@ -80,7 +80,7 @@ export PTHREAD_LIBS=" -lpthread "
 %if %{do_profiling}
 time %__make check
 %__make clean
-export CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir"
+export CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir -Wno-coverage-mismatch"
 %configure --disable-static --with-pic --docdir=%{_docdir}/%{name}
 %__make %{?_smp_mflags}
 %endif