From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dong Hao Subject: =?UTF-8?q?=5BPATCH=5D=20fix=20compilation=20error=20of=20perf/core?= Date: Tue, 25 Sep 2012 16:21:25 +0800 Message-ID: <1348561285-25587-1-git-send-email-haodong@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, xiaoguangrong@linux.vnet.ibm.com, runzhen@linux.vnet.ibm.com, Dong Hao To: acme@infradead.org Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org =46rom: Dong Hao The newest branch of perf/core should have compilation error! Error log includes: builtin-test.c: In function =E2=80=98perf_evsel__test_field=E2=80=99: builtin-test.c:1216:6: error: variable =E2=80=98ret=E2=80=99 set but not used [-Werror=3Dunused-but-= set-variable] builtin-test.c: In function =E2=80=98perf_evsel__tp_sched_test=E2=80=99= : builtin-test.c:1242:6: error: variable =E2=80=98ret=E2=80=99 set but not used [-Werror=3Dunused-but-= set-variable] cc1: all warnings being treated as errors make: *** [builtin-test.o] Error 1 --------------------------------------------------------------------- =46ix it by replacing return value from 0 to ret. Then this branch can be compiled successfully. Signed-off-by: Dong Hao --- 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_evs= el *evsel, const char *name, ret =3D -1; } =20 - return 0; + return ret; } =20 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 =3D -1; =20 - return 0; + return ret; } =20 static struct test { --=20 1.7.2.5