diff options
author | Yann Ylavic <ylavic@apache.org> | 2022-06-24 11:54:24 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2022-06-24 11:54:24 +0000 |
commit | bf1af69da2bcec77f9c4085996778292c1598cfa (patch) | |
tree | ae2653c8a70531b34135210425a007bbee17f756 | |
parent | 3ed48a685ce1ece3e32862685ff847e486d31ab2 (diff) | |
download | apr-bf1af69da2bcec77f9c4085996778292c1598cfa.tar.gz |
test/testmutexscope: Fix -Wvoid-pointer-to-enum-cast
* test/testmutexscope.c(test_mech_mode, eachThread):
Cast to apr_uintptr_t first before converting pointer to/from enum.
Merge r1902182 from trunk.
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902229 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | test/testmutexscope.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/testmutexscope.c b/test/testmutexscope.c index 2120fff24..8dc1afcaf 100644 --- a/test/testmutexscope.c +++ b/test/testmutexscope.c @@ -93,7 +93,7 @@ static void lock_release(test_mode_e test_mode) static void * APR_THREAD_FUNC eachThread(apr_thread_t *id, void *p) { - test_mode_e test_mode = (test_mode_e)p; + test_mode_e test_mode = (test_mode_e)(apr_uintptr_t)p; lock_grab(test_mode); ++counter; @@ -142,7 +142,7 @@ static void test_mech_mode(apr_lockmech_e mech, const char *mech_name, rv = apr_thread_create(&threads[i], NULL, eachThread, - (void *)test_mode, + (void *)(apr_uintptr_t)test_mode, p); if (rv != APR_SUCCESS) { fprintf(stderr, "apr_thread_create->%d\n", rv); |