From: Dong Hao <haodong@linux.vnet.ibm.com>
To: acme@infradead.org
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
xiaoguangrong@linux.vnet.ibm.com, runzhen@linux.vnet.ibm.com,
Dong Hao <haodong@linux.vnet.ibm.com>
Subject: [PATCH] fix compilation error of perf/core
Date: Tue, 25 Sep 2012 16:21:25 +0800 [thread overview]
Message-ID: <1348561285-25587-1-git-send-email-haodong@linux.vnet.ibm.com> (raw)
From: Dong Hao <haodong@linux.vnet.ibm.com>
The newest branch of perf/core should have compilation error!
Error log includes:
builtin-test.c: In function ‘perf_evsel__test_field’:
builtin-test.c:1216:6: error:
variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
builtin-test.c: In function ‘perf_evsel__tp_sched_test’:
builtin-test.c:1242:6: error:
variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make: *** [builtin-test.o] Error 1
---------------------------------------------------------------------
Fix it by replacing return value from 0 to ret.
Then this branch can be compiled successfully.
Signed-off-by: Dong Hao <haodong@linux.vnet.ibm.com>
---
tools/perf/builtin-test.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index 32caf13..78b47a7 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -1233,7 +1233,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
ret = -1;
}
- return 0;
+ return ret;
}
static int perf_evsel__tp_sched_test(void)
@@ -1286,7 +1286,7 @@ static int perf_evsel__tp_sched_test(void)
if (perf_evsel__test_field(evsel, "target_cpu", 4, true))
ret = -1;
- return 0;
+ return ret;
}
static struct test {
--
1.7.2.5
next reply other threads:[~2012-09-25 8:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 8:21 Dong Hao [this message]
2012-09-25 8:50 ` [PATCH] fix compilation error of perf/core Namhyung Kim
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=1348561285-25587-1-git-send-email-haodong@linux.vnet.ibm.com \
--to=haodong@linux.vnet.ibm.com \
--cc=acme@infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=runzhen@linux.vnet.ibm.com \
--cc=xiaoguangrong@linux.vnet.ibm.com \
/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