diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-06-06 15:27:38 -0700 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2018-07-12 11:04:17 +0300 |
commit | 51dccf8aac8a7363c8b42c09b67626061cf64a7f (patch) | |
tree | 48962c394057a98be1053177c88887a282ad0769 /tests/sw_sync.c | |
parent | e19fd5549e9cf603251704117fc64f4068be5016 (diff) |
tests/sw_sync: fix pthread start_routine declaration
pthread_create() expects a void *(*start_routine) (void *). Fix warning
the following warning on gcc 8:
../tests/sw_sync.c:773:37: warning: cast between incompatible function types from ‘int (*)(void *)’ to ‘void * (*)(void *)’ [-Wcast-function-type]
pthread_create(&threads[i], NULL, (void * (*)(void *))
^
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'tests/sw_sync.c')
-rw-r--r-- | tests/sw_sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sw_sync.c b/tests/sw_sync.c index c6867e09..59603763 100644 --- a/tests/sw_sync.c +++ b/tests/sw_sync.c @@ -667,7 +667,7 @@ static struct { pthread_mutex_t lock; } test_mpsc_data; -static int mpsc_producer_thread(void *d) +static void *mpsc_producer_thread(void *d) { int id = (long)d; int fence, i; @@ -700,7 +700,7 @@ static int mpsc_producer_thread(void *d) close(fence); } - return 0; + return NULL; } static int mpsc_consumer_thread(void) |