Fix [-Werror=implicit-fallthrough=] with gcc-7.1.1.

This commit is contained in:
Jan Kratochvil 2017-06-09 07:32:35 +02:00
parent 71166286e0
commit 4acd8bc183
2 changed files with 25 additions and 1 deletions

View File

@ -1,10 +1,11 @@
Name: libipt
Version: 1.6.1
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Intel Processor Trace Decoder Library
License: BSD
URL: https://github.com/01org/processor-trace
Source0: https://github.com/01org/processor-trace/archive/v%{version}.tar.gz
Patch1: v1.6.1-implicit-fallthrough.patch
BuildRequires: cmake
ExclusiveArch: %{ix86} x86_64
@ -27,6 +28,7 @@ develop programs that use the Intel Processor Trace (Intel PT) Decoder Library.
%prep
%setup -q -n processor-trace-%{version}
%patch1 -p1
%build
# -DPTUNIT:BOOL=ON has no effect on ctest.
@ -55,6 +57,9 @@ ctest -V %{?_smp_mflags}
%{_libdir}/%{name}.so
%changelog
* Fri Jun 9 2017 Jan Kratochvil <jan.kratochvil@redhat.com> - 1.6.1-2
- Fix [-Werror=implicit-fallthrough=] with gcc-7.1.1.
* Fri Jun 9 2017 Jan Kratochvil <jan.kratochvil@redhat.com> - 1.6.1-1
- Rebase to upstream 1.6.1.

View File

@ -0,0 +1,19 @@
gcc-7.1.1-1.fc27.x86_64
/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c: In function pt_blk_proceed_no_event_cached:
/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c:2282:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
if (bce.isize) {
^
/home/jkratoch/redhat/fedora/libipt/master/processor-trace-1.6.1/libipt/src/pt_block_decoder.c:2328:2: note: here
case ptbq_decode: {
^~~~
--- processor-trace-1.6.1-orig/libipt/src/pt_block_decoder.c 2017-05-31 13:30:32.000000000 +0200
+++ processor-trace-1.6.1/libipt/src/pt_block_decoder.c 2017-06-09 07:24:12.644587611 +0200
@@ -2324,6 +2324,7 @@ static int pt_blk_proceed_no_event_cache
}
/* Fall through to ptbq_decode. */
+ __attribute__ ((fallthrough));
case ptbq_decode: {
struct pt_insn_ext iext;