Hi,
Jie Gao schrieb:
That error is now gone. But I've found more errors:
/bin/bash /usr/local/src/httpd-2.2.14/srclib/apr/libtool --silent --mode=compile
/opt/SUNWspro/bin/cc -g -fast -DHAVE_CONFIG_H -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT -D_LARGEFILE64_SOURCE -I./include
-I/usr/local/src/httpd-2.2.14/srclib/apr/include/arch/unix -I./include/arch/unix
-I/usr/local/src/httpd-2.2.14/srclib/apr/include/arch/unix
-I/usr/local/src/httpd-2.2.14/srclib/apr/include -o shmem/unix/shm.lo -c
shmem/unix/shm.c && touch shmem/unix/shm.lo
"shmem/unix/shm.c", line 87: warning: statement not reached
"shmem/unix/shm.c", line 218: warning: statement not reached
"shmem/unix/shm.c", line 365: warning: statement not reached
"shmem/unix/shm.c", line 424: warning: statement not reached
"shmem/unix/shm.c", line 455: warning: statement not reached
"shmem/unix/shm.c", line 573: warning: statement not reached
this seems to be a problem of the way how we have arranged the
conditionals in shm.c; f.e. provided we have:
#define APR_USE_SHMEM_MMAP_SHM 1
in the compiler sees in shm.c:
...
else {
#if APR_USE_SHMEM_MMAP_SHM
if (munmap(m->base, m->realsize) == -1) {
return errno;
}
if (shm_unlink(m->filename) == -1) {
return errno;
}
return APR_SUCCESS;
#endif
}
return APR_ENOTIMPL;
so the compiler is right here: inside the conditional we allways return
already either with errno or APR_SUCCESS, thus:
return APR_ENOTIMPL;
is never reached ......
I think we must change the conditionals into a chain of:
#if COND_1
...
#elif COND_2
...
#elif COND_3
...
#else
return APR_ENOTIMPL;
#endif
thoughts?
Gün.