Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.10.0, 0.11.0
-
None
-
None
-
Linux, gcc 4.1.2
Description
My C++ project compiles with very anal retentive warning settings (-Wall -Wextra -Werror). I cannot include the log4cxx header files in this project without the attached patch. Here are the warnings that this fixes:
../../../src/main/include/log4cxx/helpers/objectptr.h: In copy constructor 'log4cxx::helpers::ObjectPtrT<T>::ObjectPtrT(const log4cxx::helpers::ObjectPtrT<T>&) [with T = log4cxx::helpers::Object]':
../../../src/main/include/log4cxx/spi/loggingevent.h:59: instantiated from here
../../../src/main/include/log4cxx/helpers/objectptr.h:74: warning: base class 'class log4cxx::helpers::ObjectPtrBase' should be explicitly initialized in the copy constructor
../../../src/main/include/log4cxx/helpers/objectptr.h: In member function 'T* log4cxx::helpers::ObjectPtrT<T>::exchange(const T*) [with T = log4cxx::Appender]':
../../../src/main/include/log4cxx/helpers/objectptr.h:109: instantiated from 'log4cxx::helpers::ObjectPtrT<T>& log4cxx::helpers::ObjectPtrT<T>::operator=(const log4cxx::helpers::ObjectPtrT<T>&) [with T = log4cxx::Appender]'
appenderattachableimpl.cpp:90: instantiated from here
../../../src/main/include/log4cxx/helpers/objectptr.h:174: warning: dereferencing type-punned pointer will break strict-aliasing rules