Boost logo

Boost Users :

Subject: [Boost-users] boost test compile warnings?
From: Maróy Ákos (akos_at_[hidden])
Date: 2009-06-25 10:08:30


Hi,

I'm having some compile warnings even when compiling very simple boost
unit test code, using boost 1.39.0, gcc 4.3.2 on linux x86_64. see the
source code at the end of the e-mail, but basically I get the following:

g++ -pedantic -ansi -Wno-long-long -Wall -W -O2 -L/tmp/boost/lib
-I/tmp/boost/include -o tests tests.cpp
In file included from
/tmp/boost/include/boost/test/output/compiler_log_formatter.hpp:20,
                  from
/tmp/boost/include/boost/test/impl/compiler_log_formatter.ipp:19,
                  from
/tmp/boost/include/boost/test/included/unit_test.hpp:18,
                  from tests.cpp:1:
/tmp/boost/include/boost/test/utils/basic_cstring/basic_cstring.hpp: In
instantiation of ‘boost::unit_test::basic_cstring<const char>’:
/tmp/boost/include/boost/test/unit_test_log_formatter.hpp:63:
instantiated from here
/tmp/boost/include/boost/test/utils/basic_cstring/basic_cstring.hpp:209:
warning: type qualifiers ignored on function return type
/tmp/boost/include/boost/test/utils/basic_cstring/basic_cstring.hpp:218:
warning: type qualifiers ignored on function return type
In file included from
/tmp/boost/include/boost/test/included/unit_test.hpp:22,
                  from tests.cpp:1:
/tmp/boost/include/boost/test/impl/execution_monitor.ipp: In destructor
‘boost::detail::signal_handler::~signal_handler()’:
/tmp/boost/include/boost/test/impl/execution_monitor.ipp:678: warning:
missing initializer for member ‘sigaltstack::ss_sp’
/tmp/boost/include/boost/test/impl/execution_monitor.ipp:678: warning:
missing initializer for member ‘sigaltstack::ss_flags’
/tmp/boost/include/boost/test/impl/execution_monitor.ipp:678: warning:
missing initializer for member ‘sigaltstack::ss_size’
In file included from
/tmp/boost/include/boost/test/included/unit_test.hpp:31,
                  from tests.cpp:1:
/tmp/boost/include/boost/test/utils/basic_cstring/basic_cstring.hpp: In
constructor
‘boost::unit_test::test_case_filter::single_filter::single_filter(boost::unit_test::const_string)’:
/tmp/boost/include/boost/test/utils/basic_cstring/basic_cstring.hpp:686:
warning: type qualifiers ignored on function return type
/tmp/boost/include/boost/test/utils/basic_cstring/basic_cstring.hpp:701:
warning: type qualifiers ignored on function return type
/usr/include/c++/4.3/bits/stl_algo.h: In function ‘char*
boost::debug::<unnamed>::prepare_window_title(const
boost::debug::dbg_startup_info&)’:
/usr/include/c++/4.3/bits/stl_algo.h:190: warning: array subscript is
above array bounds
/tmp/boost/include/boost/test/floating_point_comparison.hpp: At global
scope:
/tmp/boost/include/boost/test/floating_point_comparison.hpp:224:
warning: ‘boost::test_tools::<unnamed>::check_is_close’ defined but not used
/tmp/boost/include/boost/test/floating_point_comparison.hpp:246:
warning: ‘boost::test_tools::<unnamed>::check_is_small’ defined but not used

the source code is as simple as the following:

----------- 8< -------- cut here ----------

#include <boost/test/included/unit_test.hpp>

using namespace boost::unit_test;

test_suite *
init_unit_test_suite(int, char ** const) {

     return 0;
}

----------- >8 -------- cut here ----------

is this normal?

Akos


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