
On Tue, Jul 13, 2010 at 2:39 AM, Hite, Christopher
/fs/tools/L1/boost_1_43_0/boost/asio/error.hpp: At global scope: /fs/tools/L1/boost_1_43_0/boost/asio/error.hpp:353: warning: ‘boost::asio::error::system_category’ defined but not used /fs/tools/L1/boost_1_43_0/boost/asio/error.hpp:355: warning: ‘boost::asio::error::netdb_category’ defined but not used /fs/tools/L1/boost_1_43_0/boost/asio/error.hpp:357: warning: ‘boost::asio::error::addrinfo_category’ defined but not used
/fs/tools/L1/boost_1_43_0/boost/asio/error.hpp:359: warning: ‘boost::asio::error::misc_category’ defined but not used /fs/tools/L1/boost_1_43_0/boost/asio/error.hpp:361: warning: ‘boost::asio::error::ssl_category’ defined but not used /fs/tools/L1/boost_1_43_0/boost/system/error_code.hpp:208: warning: ‘boost::system::system_category’ defined but not used
/fs/tools/L1/boost_1_43_0/boost/system/error_code.hpp:209: warning: ‘boost::system::generic_category’ defined but not used
/fs/tools/L1/boost_1_43_0/boost/system/error_code.hpp:214: warning: ‘boost::system::posix_category’ defined but not used
/fs/tools/L1/boost_1_43_0/boost/system/error_code.hpp:215: warning: ‘boost::system::errno_ecat’ defined but not used /fs/tools/L1/boost_1_43_0/boost/system/error_code.hpp:216: warning: ‘boost::system::native_ecat’ defined but not used
Code defines static variables in header which is bad form.
static const boost::system::error_category& system_category = boost::asio::error::get_system_category();
In gcc the warning could be disabled with -Wno-unused-variable, but that disables valuable warnings.
It might be a good idea then to file a bug report with GCC requesting that the two warnings be separated.
If you really need to define global variables in a header only library, you can define static members of a template class. It's a fancy trick (not sure if it has a name). Perhaps there are portablity issues with it.
I'm sure there are plenty of creative ways to obfuscate your code. Ideas, anyone? :) Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode