Ok, it's not a "bug"... but it's damn annoying to get compiler warnings from library header. Especially when those compiler warnings are 1 page long. Is it possible to please not mention variables that aren't being used? This is what I get for a SINGLE warning: /usr/include/boost/archive/detail/interface_oarchive.hpp: In instantiation of ‘const boost::archive::detail::basic_pointer_oserializer* boost::archive::detail::interface_oarchive<Archive>::register_type(T*) [with T = std::set<DirTree, std::less<DirTree>, std::allocator<DirTree> >, Archive = boost::archive::xml_oarchive]’: /usr/include/boost/archive/detail/oserializer.hpp:332: instantiated from ‘static const boost::archive::detail::basic_pointer_oserializer* boost:: archive::detail::save_pointer_type<Archive, TPtr>::non_abstract<T>:: register_type(Archive&) [with T = std::set<DirTree, std::less<DirTree>, std::allocator<DirTree> >, Archive = boost::archive::xml_oarchive, TPtr = DirTrees*]’ /usr/include/boost/archive/detail/oserializer.hpp:349: instantiated from ‘static const boost::archive::detail::basic_pointer_oserializer* boost:: archive::detail::save_pointer_type<Archive, TPtr>::register_type(Archive&, T&) [with T = std::set<DirTree, std::less<DirTree>, std::allocator<DirTree>
, Archive = boost::archive::xml_oarchive, TPtr = DirTrees*]’ /usr/include/boost/archive/detail/oserializer.hpp:475: instantiated from ‘static void boost::archive::detail::save_pointer_type<Archive, TPtr>:: invoke(Archive&, TPtr) [with Archive = boost::archive::xml_oarchive, TPtr = DirTrees*]’ /usr/include/boost/archive/detail/oserializer.hpp:551: instantiated from ‘void boost::archive::save(Archive&, const T&) [with Archive = boost:: archive::xml_oarchive, T = DirTrees*]’ /usr/include/boost/archive/basic_xml_oarchive.hpp:84: instantiated from ‘void boost::archive::basic_xml_oarchive<Archive>::save_override(const boost::serialization::nvp<T>&, int) [with T = DirTrees* const, Archive = boost::archive::xml_oarchive]’ /usr/include/boost/archive/detail/interface_oarchive.hpp:80: instantiated from ‘Archive& boost::archive::detail::interface_oarchive<Archive>:: operator<<(const T&) [with T = boost::serialization::nvp<DirTrees* const>, Archive = boost::archive::xml_oarchive]’ ../../cppgraph/src/serialization.h:35: instantiated from ‘void Iterator<Container>::save(Archive&, unsigned int) const [with Archive = boost::archive::xml_oarchive, Container = DirTrees]’ /usr/include/boost/serialization/access.hpp:90: instantiated from ‘static void boost::serialization::access::member_save(Archive&, const T&, unsigned int) [with Archive = boost::archive::xml_oarchive, T = Iterator<DirTrees>]’ /usr/include/boost/serialization/split_member.hpp:42: instantiated from ‘static void boost::serialization::detail::member_saver<Archive, T>::invoke( Archive&, const T&, unsigned int) [with Archive = boost::archive:: xml_oarchive, T = Iterator<DirTrees>]’ /usr/include/boost/serialization/split_member.hpp:63: instantiated from ‘void boost::serialization::split_member(Archive&, T&, unsigned int) [with Archive = boost::archive::xml_oarchive, T = Iterator<DirTrees>]’ ../../cppgraph/src/serialization.h:46: instantiated from ‘void Iterator<Container>::serialize(Archive&, unsigned int) [with Archive = boost::archive::xml_oarchive, Container = DirTrees]’ /usr/include/boost/serialization/access.hpp:106: instantiated from ‘static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::xml_oarchive, T = Iterator<DirTrees>]’ /usr/include/boost/serialization/serialization.hpp:78: instantiated from ‘void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::xml_oarchive, T = Iterator<DirTrees>]’ /usr/include/boost/serialization/serialization.hpp:121: instantiated from ‘void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::xml_oarchive, T = Iterator<DirTrees>]’ /usr/include/boost/archive/detail/oserializer.hpp:148: instantiated from ‘void boost::archive::detail::oserializer<Archive, T>::save_object_data (boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::archive::xml_oarchive, T = Iterator<DirTrees>]’ ../../cppgraph/src/serialization.cc:40: instantiated from here /usr/include/boost/archive/detail/interface_oarchive.hpp:60: warning: unused parameter ‘t’
Moreover, I normally treat warnings as errors (with -Werror); which is impossible when a third party library generates warnings. -- Carlo Wood <carlo@alinoe.com>
Carlo Wood wrote:
Ok, it's not a "bug"... but it's damn annoying to get compiler warnings from library header. Especially when those compiler warnings are 1 page long.
Is it possible to please not mention variables that aren't being used?
Hmm - I would like to do that but I don't see how its possible to do it in this case while still preserving the intent of the function; Robert Ramey
On Sun, Mar 12, 2006 at 08:18:45PM -0800, Robert Ramey wrote:
Carlo Wood wrote:
Ok, it's not a "bug"... but it's damn annoying to get compiler warnings from library header. Especially when those compiler warnings are 1 page long.
Is it possible to please not mention variables that aren't being used?
Hmm - I would like to do that but I don't see how its possible to do it in this case while still preserving the intent of the function;
Robert Ramey
Heh? Just delete the 't'. I did it in my local copy of boost, because I can't work with the warning, but I'd like this fix to be in the next release of boost. Thus, template<class T> const basic_pointer_iserializer * register_type(T * t = NULL){ becomes template<class T> const basic_pointer_iserializer * register_type(T * = NULL){ etc (for any function that has function parameters that aren't used). -- Carlo Wood <carlo@alinoe.com>
participants (2)
-
Carlo Wood
-
Robert Ramey