From e1de8e3c33257b4e7d6b98767a67414efc31b6c7 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 4 Mar 2011 08:03:46 +0000 Subject: Casting fixups --- tests/exception1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/exception1.c') diff --git a/tests/exception1.c b/tests/exception1.c index 3f9f595..4340078 100644 --- a/tests/exception1.c +++ b/tests/exception1.c @@ -98,7 +98,7 @@ exceptionedThread(void * arg) #if defined(_MSC_VER) && !defined(__cplusplus) __try { - int zero = (int) arg; /* Passed in from arg to avoid compiler error */ + int zero = (int) (size_t)arg; /* Passed in from arg to avoid compiler error */ int one = 1; /* * The deliberate exception condition (zero divide) is @@ -133,7 +133,7 @@ exceptionedThread(void * arg) } #endif - return (void *) result; + return (void *) (size_t)result; } void * @@ -184,7 +184,7 @@ canceledThread(void * arg) } #endif - return (void *) result; + return (void *) (size_t)result; } int @@ -229,13 +229,13 @@ main() int result = 0; /* Canceled thread */ - assert(pthread_join(ct[i], (void **) &result) == 0); + assert(pthread_join(ct[i], (void *) &result) == 0); assert(!(fail = (result != (int) PTHREAD_CANCELED))); failed = (failed || fail); /* Exceptioned thread */ - assert(pthread_join(et[i], (void **) &result) == 0); + assert(pthread_join(et[i], (void *) &result) == 0); assert(!(fail = (result != ((int) PTHREAD_CANCELED + 2)))); failed = (failed || fail); -- cgit v1.2.3