[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1347065004-15306-9-git-send-email-irina.tirdea@intel.com>
Date: Sat, 8 Sep 2012 03:43:20 +0300
From: Irina Tirdea <irina.tirdea@...il.com>
To: mingo@...hat.com, acme@...stprotocols.net, a.p.zijlstra@...llo.nl,
rostedt@...dmis.org
Cc: paulus@...ba.org, dsahern@...il.com, namhyung.kim@....com,
linux-kernel@...r.kernel.org, Irina Tirdea <irina.tirdea@...el.com>
Subject: [PATCH v2 08/12] perf tools: fix no return in non-void function
From: Irina Tirdea <irina.tirdea@...el.com>
thread_func in builtin-sched.c has an internal loop and never returns.
The only return from this thread are BUG_ON calls in case return values
are not 0.
The compiler on Android complains that the function needs to return a
non-void value. Adding the noreturn function attribute to fix this error.
Error in Android:
target C: perf <= builtin-sched.c
hardware/intel/linu/tools/perf/builtin-sched.c: In function 'thread_func':
hardware/intel/linux/tools/perf/builtin-sched.c:476: error: no return
statement in function returning non-void
Signed-off-by: Irina Tirdea <irina.tirdea@...el.com>
---
tools/perf/builtin-sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index a25a023..1fecc95 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -439,7 +439,7 @@ static u64 get_cpu_usage_nsec_self(int fd)
return runtime;
}
-static void *thread_func(void *ctx)
+static __attribute__ ((noreturn)) void *thread_func(void *ctx)
{
struct task_desc *this_task = ctx;
u64 cpu_usage_0, cpu_usage_1;
--
1.7.9.5
--
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