From 665eb3efcc4557deddb70ecce68ec3b918ae9c5e Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 1 Jun 2012 17:12:43 -0400 Subject: [PATCH] warning fix: tests urcutorture for NetBSD 5 > CC rcutorture_urcu-urcutorture.o > In file included from urcutorture.c:9: > api.h: In function '__smp_thread_id': > api.h:160: warning: cast from pointer to integer of different size > api.h:160: warning: cast from pointer to integer of different size > api.h: In function 'wait_thread': > api.h:210: warning: cast from pointer to integer of different size > api.h:210: warning: cast from pointer to integer of different size Signed-off-by: Mathieu Desnoyers --- tests/api.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/api.h b/tests/api.h index 9746ea4..6d71900 100644 --- a/tests/api.h +++ b/tests/api.h @@ -156,8 +156,8 @@ static int __smp_thread_id(void) return i; } spin_unlock(&__thread_id_map_mutex); - fprintf(stderr, "smp_thread_id: Rogue thread, id: %d(%#x)\n", - (int)tid, (int)tid); + fprintf(stderr, "smp_thread_id: Rogue thread, id: %lu(%#lx)\n", + (unsigned long) tid, (unsigned long) tid); exit(-1); } @@ -206,8 +206,8 @@ static void *wait_thread(thread_id_t tid) break; } if (i >= NR_THREADS){ - fprintf(stderr, "wait_thread: bad tid = %d(%#x)\n", - (int)tid, (int)tid); + fprintf(stderr, "wait_thread: bad tid = %lu(%#lx)\n", + (unsigned long)tid, (unsigned long)tid); exit(-1); } if (pthread_join(tid, &vp) != 0) { -- 2.34.1