From: Bart Van Assche Date: Wed, 11 Mar 2009 11:09:35 +0000 (+0000) Subject: Reverted to r8771. Please ignore the commit message of r9325. X-Git-Tag: svn/VALGRIND_3_5_0~879 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4afea227f6122c62aabed057255dda0672bc1188;p=thirdparty%2Fvalgrind.git Reverted to r8771. Please ignore the commit message of r9325. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9358 --- diff --git a/helgrind/tests/bar_trivial.c b/helgrind/tests/bar_trivial.c index 26a6b37c7d..8c221ae8ee 100644 --- a/helgrind/tests/bar_trivial.c +++ b/helgrind/tests/bar_trivial.c @@ -16,7 +16,7 @@ pthread_barrier_t bar; void* child_fn ( void* arg ) { - long r, n = *(long*)arg; + long r, n = (long)arg; if (n == 1) x++; @@ -36,14 +36,12 @@ int main ( void ) { long i, r; pthread_t thr[NTHR]; - long thread_arg[NTHR]; r = pthread_barrier_init(&bar, NULL, NTHR); assert(!r); for (i = 0; i < NTHR; i++) { - thread_arg[i] = i; - r = pthread_create(&thr[i], NULL, child_fn, &(thread_arg[i])); + r = pthread_create(&thr[i], NULL, child_fn, (void*)i); assert(!r); }