aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yang <weiyang@linux.vnet.ibm.com>2013-09-22 04:49:24 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-11-01 09:41:54 -0400
commit32bf5bd181026fc99c0e15045abe409167285ba8 (patch)
treeb6020b08591927b7aa7b7daac33798d65035bda9
parent53805eca3d89b095062c11a6798689bb0af09216 (diff)
perf bench: Fix two warnings
There are two warnings in bench/numa, when building 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 fixes these two warnings. Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Link: http://lkml.kernel.org/r/1379839764-9245-1-git-send-email-weiyang@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/bench/numa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
index 30d1c3225b46..a73c4ed8af17 100644
--- a/tools/perf/bench/numa.c
+++ b/tools/perf/bench/numa.c
@@ -1110,7 +1110,7 @@ static void *worker_thread(void *__tdata)
1110 /* Check whether our max runtime timed out: */ 1110 /* Check whether our max runtime timed out: */
1111 if (g->p.nr_secs) { 1111 if (g->p.nr_secs) {
1112 timersub(&stop, &start0, &diff); 1112 timersub(&stop, &start0, &diff);
1113 if (diff.tv_sec >= g->p.nr_secs) { 1113 if (diff.tv_sec >= (time_t)g->p.nr_secs) {
1114 g->stop_work = true; 1114 g->stop_work = true;
1115 break; 1115 break;
1116 } 1116 }
@@ -1157,7 +1157,7 @@ static void *worker_thread(void *__tdata)
1157 runtime_ns_max += diff.tv_usec * 1000; 1157 runtime_ns_max += diff.tv_usec * 1000;
1158 1158
1159 if (details >= 0) { 1159 if (details >= 0) {
1160 printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016lx]\n", 1160 printf(" #%2d / %2d: %14.2lf nsecs/op [val: %016"PRIu64"]\n",
1161 process_nr, thread_nr, runtime_ns_max / bytes_done, val); 1161 process_nr, thread_nr, runtime_ns_max / bytes_done, val);
1162 } 1162 }
1163 fflush(stdout); 1163 fflush(stdout);