[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151214081958.GA21686@gmail.com>
Date: Mon, 14 Dec 2015 09:19:58 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Markus Trippelsdorf <markus@...ppelsdorf.de>
Cc: Matt Fleming <matt.fleming@...el.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH] Fix misleading indentation issues in perf
* Markus Trippelsdorf <markus@...ppelsdorf.de> wrote:
> perf doesn't build with gcc-6 because of several misleading-indentation
> warnings, e.g.:
>
> arch/x86/tests/intel-cqm.c: In function ‘spawn’:
> arch/x86/tests/intel-cqm.c:21:3: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
> sleep(5);
> ^~~~~
>
> arch/x86/tests/intel-cqm.c:20:2: note: ...this ‘while’ clause, but it is not
> while(1);
> ^~~~~
Nice warnings!
> diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c
> index d28c1b6a3b54..fa5d17af88b7 100644
> --- a/tools/perf/arch/x86/tests/intel-cqm.c
> +++ b/tools/perf/arch/x86/tests/intel-cqm.c
> @@ -17,7 +17,7 @@ static pid_t spawn(void)
> if (pid)
> return pid;
>
> - while(1);
> + while(1)
> sleep(5);
looks like it caught a real bug here.
> case K_UNTAB:
> - if (nd != NULL)
> + if (nd != NULL) {
> nd = rb_next(nd);
> if (nd == NULL)
> nd = rb_first(&browser->entries);
> - else
> + } else
> nd = browser->curr_hot;
> break;
That looks like a real bug as well AFAICS.
> case K_F1:
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index e4b173dec4b9..c900b664ab8f 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -153,7 +153,7 @@ static int perf_pmu__parse_unit(struct perf_pmu_alias *alias, char *dir, char *n
> if (fd == -1)
> return -1;
>
> - sret = read(fd, alias->unit, UNIT_MAX_LEN);
> + sret = read(fd, alias->unit, UNIT_MAX_LEN);
> if (sret < 0)
> goto error;
This is just whitespace noise, but annoying.
Cool compiler feature.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists