|
Boost Users : |
Subject: [Boost-users] [log] , [smart_ptr] global logger declaration issues tons of warnings
From: Valerii Valeev (valerii.valeev_at_[hidden])
Date: 2014-07-10 13:25:33
Hello,
global logger declaration as follows
BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT(mylog_master, boost::log::sources::severity_logger<boost::log::trivial::severity_level>);
issues a lots of warnings (see below) pointing to some smart_ptr code.
If anyone could advice - does it look like my problem or something else it would be greatly appreciated.
Cheers,
Valerii.
Warning text:
In file included from /usr/local/boost-1.55.0/include/boost/smart_ptr/make_shared_object.hpp:17,
from /usr/local/boost-1.55.0/include/boost/log/sources/global_logger_storage.hpp:21,
from /usr/local/boost-1.55.0/include/boost/log/common.hpp:24,
from mylog.cpp:10:
/usr/local/boost-1.55.0/include/boost/smart_ptr/detail/sp_forward.hpp: In function T&& boost::detail::sp_forward(T&) [with T = const char*]:
/usr/local/boost-1.55.0/include/boost/smart_ptr/make_shared_object.hpp:218: instantiated from typename boost::detail::sp_if_not_array<T>::type boost::make_shared(Arg1&&, Args&& ...) [with T = boost::log::v2s_mt_posix::sources::aux::logger_holder<boost::log::v2s_mt_posix::sources::severity_logger<boost::log::v2s_mt_posix::trivial::severity_level> >, Arg1 = const char*, Args = unsigned int, mylog_master::logger_type]
/usr/local/boost-1.55.0/include/boost/log/sources/global_logger_storage.hpp:141: instantiated from static boost::shared_ptr<boost::log::v2s_mt_posix::sources::aux::logger_holder_base> boost::log::v2s_mt_posix::sources::aux::logger_singleton<TagT>::construct_logger() [with TagT = mylog_master]
/usr/local/boost-1.55.0/include/boost/log/sources/global_logger_storage.hpp:121: instantiated from static void boost::log::v2s_mt_posix::sources::aux::logger_singleton<TagT>::init_instance() [with TagT = mylog_master]
/usr/local/boost-1.55.0/include/boost/log/detail/singleton.hpp:45: instantiated from static StorageT& boost::log::v2s_mt_posix::aux::lazy_singleton<DerivedT, StorageT>::get() [with DerivedT = boost::log::v2s_mt_posix::sources::aux::logger_singleton<mylog_master>, StorageT = boost::shared_ptr<boost::log::v2s_mt_posix::sources::aux::logger_holder<boost::log::v2s_mt_posix::sources::severity_logger<boost::log::v2s_mt_posix::trivial::severity_level> > >]
/usr/local/boost-1.55.0/include/boost/log/sources/global_logger_storage.hpp:112: instantiated from static typename TagT::logger_type& boost::log::v2s_mt_posix::sources::aux::logger_singleton<TagT>::get() [with TagT = mylog_master]
../../include/myproject/mylog.hpp:20: instantiated from here
/usr/local/boost-1.55.0/include/boost/smart_ptr/detail/sp_forward.hpp:30: warning: returning reference to temporary
mylog.hpp:20 is the line where global logger is declared:
BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT(mylog_master, boost::log::sources::severity_logger<boost::log::trivial::severity_level>);
And my platform / compiler:
$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net