id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 498,Compiler warning with gcc on Linux,nobody,Robert Ramey,"{{{ I get the following warning compiling on Linux with gcc. No mater what I do I can't seem to get around the warning. Any ideas? Thanks! g++ -c -pipe -Wall -W -g -fPIC -I/usr/lib/qt-3.1/mkspecs/default -I. -I. -Iinclude -Isrc -I../ccbus -I/usr/lib/qt-3.1/include -I.ui/ -I.moc/ -o .obj/TraderButtonKey.o src/TraderButtonKey.cpp /usr/include/boost/archive/detail/common_iarchive.hpp: In member function `void boost::archive::detail::common_iarchive::init() [with Archive = boost::archive::text_iarchive]': /usr/include/boost/archive/text_iarchive.hpp:69: instantiated from `boost::archive::text_iarchive_impl::text_iarchive_impl(std::istream&, unsigned int) [with Archive = boost::archive::text_iarchive]' /usr/include/boost/archive/text_iarchive.hpp:82: instantiated from here /usr/include/boost/archive/detail/common_iarchive.hpp:75: warning: choosing ` boost::archive::version_type::operator unsigned int&()' over ` boost::archive::version_type::operator unsigned int() const' /usr/include/boost/archive/detail/common_iarchive.hpp:75: warning: for conversion from `boost::archive::version_type' to `unsigned int' /usr/include/boost/archive/detail/common_iarchive.hpp:75: warning: because conversion sequence for the argument is better Code fragment: class TraderButtonKey { public: //! Default constructor. TraderButtonKey( ) : m_cls(0), m_number(0) {} //! Constructor. //! //! \param cls the class //! \param number the number TraderButtonKey( int cls, int number ) : m_cls(cls), m_number(number) {} ... private: //! Required by the boost C++ libraries to provide serialization to //! and from the archive. //! //! \param ar archive to save/load object members //! \param version boost class version template void serialize( Archive & ar, const unsigned int version ) { if (version) // gets rid of unused parameter warning ; ar & m_cls; ar & m_number; } int m_cls; //!< class of the key int m_number; //!< number within that class }; }}}",Bugs,closed,,serialization,None,,Works For Me,,