The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] perf: fix two warning in bench/numa
@ 2013-09-22  8:49 Wei Yang
  2013-09-25  7:35 ` Wei Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wei Yang @ 2013-09-22  8:49 UTC (permalink / raw)
  To: linux-kernel, acme, mingo; +Cc: Wei Yang

There two warnings in bench/numa, when buiding this on 32-bit machine. 

The warning output is attached:

bench/numa.c:1113:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
bench/numa.c:1161:6: error: format ‘%lx’ expects argument of t'long unsigned int’, but argument 5 has type ‘u64’ [-Werror=format]

This patch fixs these two warnings.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
---
 tools/perf/bench/numa.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 30d1c32..a73c4ed 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -1110,7 +1110,7 @@ static void *worker_thread(void *__tdata)
 		/* Check whether our max runtime timed out: */
 		if (g->p.nr_secs) {
 			timersub(&stop, &start0, &diff);
-			if (diff.tv_sec >= g->p.nr_secs) {
+			if (diff.tv_sec >= (time_t)g->p.nr_secs) {
 				g->stop_work = true;
 				break;
 			}
@@ -1157,7 +1157,7 @@ static void *worker_thread(void *__tdata)
 			runtime_ns_max += diff.tv_usec * 1000;
 
 			if (details >= 0) {
-				printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n",
+				printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIu64"]\n",
 					process_nr, thread_nr, runtime_ns_max / bytes_done, val);
 			}
 			fflush(stdout);
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-04  6:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-22  8:49 [PATCH] perf: fix two warning in bench/numa Wei Yang
2013-09-25  7:35 ` Wei Yang
2013-09-25 11:26   ` Ingo Molnar
2013-09-26  1:16     ` Wei Yang
2013-10-30  3:18 ` Wei Yang
2013-11-04  6:54 ` [tip:perf/core] perf bench: Fix two warnings tip-bot for Wei Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox