You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2024/03/15 10:16:01 UTC

svn commit: r1916331 - in /apr/apr/branches/1.7.x: ./ test/testmutexscope.c

Author: ylavic
Date: Fri Mar 15 10:16:00 2024
New Revision: 1916331

URL: http://svn.apache.org/viewvc?rev=1916331&view=rev
Log:
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
Merges r1902229 from ^/apr/apr/branches/1.8.x

Modified:
    apr/apr/branches/1.7.x/   (props changed)
    apr/apr/branches/1.7.x/test/testmutexscope.c

Propchange: apr/apr/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /apr/apr/branches/1.8.x:r1902229
  Merged /apr/apr/trunk:r1902182

Modified: apr/apr/branches/1.7.x/test/testmutexscope.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/test/testmutexscope.c?rev=1916331&r1=1916330&r2=1916331&view=diff
==============================================================================
--- apr/apr/branches/1.7.x/test/testmutexscope.c (original)
+++ apr/apr/branches/1.7.x/test/testmutexscope.c Fri Mar 15 10:16:00 2024
@@ -93,7 +93,7 @@ static void lock_release(test_mode_e tes
 
 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_
     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);