From: Kang Kai <Kai.Kang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] libpfm4: fix compile error
Date: Wed, 29 Jun 2016 17:26:11 +0800 [thread overview]
Message-ID: <57739433.40200@windriver.com> (raw)
In-Reply-To: <1467187725-7761-1-git-send-email-kai.kang@windriver.com>
On 2016年06月29日 16:08, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
>
> It fails to compile libpfm4 with misleading-indentation error:
>
> | syst_count.c:346:3: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
> | for(c=cmin ; c < cmax; c++)
> | ^~~
>
> Add clauses to fix it.
Oops...
s/clauses/braces/
--Kai
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
> .../files/fix-misleading-indentation-error.patch | 38 ++++++++++++++++++++++
> meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb | 1 +
> 2 files changed, 39 insertions(+)
> create mode 100644 meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
>
> diff --git a/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch b/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
> new file mode 100644
> index 0000000..25d47ef
> --- /dev/null
> +++ b/meta/recipes-kernel/libpfm/files/fix-misleading-indentation-error.patch
> @@ -0,0 +1,38 @@
> +Upstream-Status: Pending
> +
> +Fix compile error:
> +
> +| syst_count.c:346:3: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
> +| for(c=cmin ; c < cmax; c++)
> +| ^~~
> +
> +Signed-off-by: Kai Kang <kai.kang@windriver.com>
> +---
> +diff --git a/perf_examples/syst_count.c b/perf_examples/syst_count.c
> +index 0d53078..2dfb9b9 100644
> +--- a/perf_examples/syst_count.c
> ++++ b/perf_examples/syst_count.c
> +@@ -343,8 +343,9 @@ measure(void)
> +
> + for (delay = 1 ; delay <= options.delay; delay++) {
> +
> +- for(c=cmin ; c < cmax; c++)
> +- start_cpu(c);
> ++ for(c=cmin ; c < cmax; c++) {
> ++ start_cpu(c);
> ++ }
> +
> + if (0) {
> + tv.tv_sec = 0;
> +@@ -353,8 +354,9 @@ measure(void)
> + } else
> + sleep(1);
> +
> +- for(c=cmin ; c < cmax; c++)
> +- stop_cpu(c);
> ++ for(c=cmin ; c < cmax; c++) {
> ++ stop_cpu(c);
> ++ }
> +
> + for(c = cmin; c < cmax; c++) {
> + printf("# %'ds -----\n", delay);
> diff --git a/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb b/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
> index 0b024ad..4136eac 100644
> --- a/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
> +++ b/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
> @@ -14,6 +14,7 @@ COMPATIBLE_HOST = "powerpc64"
>
> SRC_URI = "http://downloads.sourceforge.net/project/perfmon2/${BPN}/libpfm-${PV}.tar.gz \
> file://0001-Makefile-Add-LDFLAGS-variable-to-SLDFLAGS.patch \
> + file://fix-misleading-indentation-error.patch \
> "
>
> SRC_URI[md5sum] = "5077b9022440e4951d96f2d0e73bd487"
--
Regards,
Neil | Kai Kang
prev parent reply other threads:[~2016-06-29 9:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 8:08 [PATCH] libpfm4: fix compile error kai.kang
2016-06-29 9:26 ` Kang Kai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57739433.40200@windriver.com \
--to=kai.kang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox