From f94895de17063d244841efba2dcb5fe8dba2e838 Mon Sep 17 00:00:00 2001 From: pooka Date: Thu, 8 Nov 2007 10:57:19 +0000 Subject: [PATCH] Cast void * to intptr_t before casting to int and vice versa. Fixes 64bit compilation warnings. reported by moof & wiz --- sys/rump/librump/rumpuser/rumpuser_pth.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/rump/librump/rumpuser/rumpuser_pth.c b/sys/rump/librump/rumpuser/rumpuser_pth.c index fd9d7efd1b13..2d1f44ace699 100644 --- a/sys/rump/librump/rumpuser/rumpuser_pth.c +++ b/sys/rump/librump/rumpuser/rumpuser_pth.c @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_pth.c,v 1.3 2007/11/07 18:59:19 pooka Exp $ */ +/* $NetBSD: rumpuser_pth.c,v 1.4 2007/11/08 10:57:19 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -283,8 +283,8 @@ rumpuser_set_ipl(int what) if (what == RUMPUSER_IPL_INTR) { pthread_setspecific(isintr, (void *)RUMPUSER_IPL_INTR); } else { - cur = (int)pthread_getspecific(isintr); - pthread_setspecific(isintr, (void *)(cur+1)); + cur = (int)(intptr_t)pthread_getspecific(isintr); + pthread_setspecific(isintr, (void *)(intptr_t)(cur+1)); } } @@ -292,7 +292,7 @@ int rumpuser_whatis_ipl() { - return (int)pthread_getspecific(isintr); + return (int)(intptr_t)pthread_getspecific(isintr); } void @@ -303,8 +303,8 @@ rumpuser_clear_ipl(int what) if (what == RUMPUSER_IPL_INTR) cur = 1; else - cur = (int)pthread_getspecific(isintr); + cur = (int)(intptr_t)pthread_getspecific(isintr); cur--; - pthread_setspecific(isintr, (void *)cur); + pthread_setspecific(isintr, (void *)(intptr_t)cur); }