Index: src/main/cpp/asyncappender.cpp
===================================================================
--- src/main/cpp/asyncappender.cpp	(revision 652071)
+++ src/main/cpp/asyncappender.cpp	(working copy)
@@ -313,7 +313,7 @@
 
 
 #if APR_HAS_THREADS
-void* LOG4CXX_THREAD_FUNC AsyncAppender::dispatch(apr_thread_t* thread, void* data) {
+void* LOG4CXX_THREAD_FUNC AsyncAppender::dispatch(apr_thread_t* /*thread*/, void* data) {
     AsyncAppender* pThis = (AsyncAppender*) data;
     bool isActive = true;
     try {
Index: src/main/include/log4cxx/helpers/objectptr.h
===================================================================
--- src/main/include/log4cxx/helpers/objectptr.h	(revision 652071)
+++ src/main/include/log4cxx/helpers/objectptr.h	(working copy)
@@ -28,9 +28,9 @@
 //   switching between the initialization styles.
 //
 #if LOG4CXX_HELGRIND
-#define _LOG4CXX_OBJECTPTR_INIT(x) { exchange(x); 
+#define _LOG4CXX_OBJECTPTR_INIT(x) : ObjectPtrBase() { exchange(x); 
 #else
-#define _LOG4CXX_OBJECTPTR_INIT(x) : p(x) {
+#define _LOG4CXX_OBJECTPTR_INIT(x) : ObjectPtrBase(), p(x) {
 #endif
 
 namespace log4cxx
@@ -169,8 +169,13 @@
             return 0;
          }
        T* exchange(const T* newValue) {
+             // Avoid GCC strict aliasing warnings
+             union {
+               T** in;
+               void** out;
+             } temp = { &p };
              return static_cast<T*>(ObjectPtrBase::exchange(
-                 reinterpret_cast<void**>(&p), 
+                 temp.out, 
                  const_cast<T*>(newValue)));
        }
 
