Seems like an easy fix, the (void*) cast was put for the wrong parameter.

See http://docs.sun.com/app/docs/doc/816-5180/atomic-cas-ptr-9f?a=view
for the prototype for atomic_cas_ptr.

Trunk version add -Werror which caused build to fail on warning.

Attached is a one line patch for fix.

Cheers,
Henry


On Fri, May 30, 2008 at 10:16 PM, William A. Rowe, Jr.
<[EMAIL PROTECTED]> wrote:
> Henry Jen wrote:
>>
>> Trunk failed to compile with following error:
>>
>> atomic/unix/solaris.c: In function `apr_atomic_casptr':
>> atomic/unix/solaris.c:71: warning: passing arg 2 of `atomic_cas_ptr'
>> discards qualifiers from pointer target type
>> make[1]: *** [atomic/unix/solaris.lo] Error 1
>> make[1]: Leaving directory
>> `/export/home/henryjen/prj/apache.org/apr-trunk'
>> make: *** [all-recursive] Error 1
>>
>> Will investigate.
>
> I suspect this is the misplaced volatile modifier which needs to be fixed
> in 2.0, not before.
>
Index: atomic/unix/solaris.c
===================================================================
--- atomic/unix/solaris.c	(revision 661957)
+++ atomic/unix/solaris.c	(working copy)
@@ -68,7 +68,7 @@
 
 APR_DECLARE(void*) apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
 {
-    return atomic_cas_ptr(mem, cmp, (void*) with);
+    return atomic_cas_ptr(mem, (void*) cmp, with);
 }
 
 APR_DECLARE(void*) apr_atomic_xchgptr(volatile void **mem, void *with)

Reply via email to