as shown by following output excerpt from make check : testatomic.c: In function 'check_basic_atomics': testatomic.c:84: warning: passing argument 1 of 'apr_atomic_casptr' from incompatible pointer type testatomic.c:91: warning: passing argument 1 of 'apr_atomic_casptr' from incompatible pointer type testatomic.c:98: warning: passing argument 1 of 'apr_atomic_casptr' from incompatible pointer type problem is only present in the 0.9 branch including the current HEAD and the last released version 0.9.14 and is triggered by a mismatch in the first parameter pointer which is defined in all architectures as "volatile void **" but is defined in the test as a dereference to "void *" (netware has a different ABI, presumably by mistake and uses void **)
I don't see the warning and neither the dereference to "void *" -- can't dereference void pointers.. Which compiler are you using? version?
Created attachment 20560 [details] uses volatile void * as the first parameter for apr_atomic_casptr for everyone but netware #ifdef required so that NETWARE can be kept using void * and respecting current ABI (for 0.9.x branch). if ABI doesn't need to be kept stable and is better to use the same ABI that 1.x has then ifdef could be removed and the first parameter changed in include/apr_atomic.h (can provide a patch as well, as that is what I did for my own tree which uses apr statically and I don't care about ABI incompatibilities)
got warning with either gcc-4.1.2 or gcc-3.4.6 in amd64 linux as shown below : $ gcc -v Using built-in specs. Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure - -prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/l ib/gcc/x86_64-pc-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/x86_64-pc -linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man --in fodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info --with-gxx-include-dir= /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-nls --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-excep tions --enable-multilib --disable-libmudflap --disable-libssp --enable-languages =c,c++,java,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu Thread model: posix gcc version 4.1.2 (Gentoo 4.1.2) $ make testatomic.o gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I../include -c testatomic.c testatomic.c: In function 'check_basic_atomics': testatomic.c:84: warning: passing argument 1 of 'apr_atomic_casptr' from incompatible pointer type testatomic.c:91: warning: passing argument 1 of 'apr_atomic_casptr' from incompatible pointer type testatomic.c:98: warning: passing argument 1 of 'apr_atomic_casptr' from incompatible pointer type
my comment about a "dereference for void *" was obviously incorrect, what I meant to refer to was the use of the "address of" operator for casptr as the first parameter of apr_atomic_casptr as shown by the following excerpt from testatomic.c's check_basic_atomics. void *casptr; casptr = NULL; oldptr = apr_atomic_casptr(&casptr, &object1, 0); the definition (from include/apr_atomic.h) for apr_atomic_casptr says : void *apr_atomic_casptr(volatile void **mem, void *with, const void *cmp);
Patch committed to the 0.9.x branch in revision 560724: http://svn.apache.org/viewvc?view=rev&revision=560724