Skip to content

Commit 0586f5c

Browse files
acmelgregkh
authored andcommitted
perf top: Use __fallthrough
commit 7b0214b702ad8e124e039a317beeebb3f020d125 upstream. The implicit fall through case label here is intended, so let us inform that to gcc >= 7: CC /tmp/build/perf/builtin-top.o builtin-top.c: In function 'display_thread': builtin-top.c:644:7: error: this statement may fall through [-Werror=implicit-fallthrough=] if (errno == EINTR) ^ builtin-top.c:647:3: note: here default: ^~~~~~~ Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-lmcfnnyx9ic0m6j0aud98p4e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1ca0a40 commit 0586f5c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/perf/builtin-top.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ static void *display_thread(void *arg)
636636
case -1:
637637
if (errno == EINTR)
638638
continue;
639-
/* Fall trhu */
639+
__fallthrough;
640640
default:
641641
c = getc(stdin);
642642
tcsetattr(0, TCSAFLUSH, &save);

0 commit comments

Comments
 (0)