Update warning suppressions

This commit is contained in:
Peter Dimov
2022-06-03 20:59:41 +03:00
parent 873a60d009
commit c9c77cb104
4 changed files with 15 additions and 12 deletions

View File

@@ -5,13 +5,16 @@
import testing ;
local gcc-flags = -Wunused-parameter -Wconversion -Wsign-conversion -Wfloat-equal -Wshadow -Wno-variadic-macros ;
local clang-flags = $(gcc-flags) ;
project hash-tests
: requirements
<warnings>pedantic
<toolset>intel:<warnings>on
<toolset>gcc:<cxxflags>"-Wstrict-aliasing -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
<toolset>darwin:<cxxflags>"-Wstrict-aliasing -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow"
<toolset>clang:<cxxflags>"-Wstrict-aliasing -Wsign-promo -Wunused-parameter -Wsign-conversion -Wconversion -Wfloat-equal -Wshadow"
<toolset>gcc:<cxxflags>$(gcc-flags)
<toolset>darwin:<cxxflags>$(gcc-flags)
<toolset>clang:<cxxflags>$(clang-flags)
<toolset>msvc:<warnings-as-errors>on
<toolset>gcc:<warnings-as-errors>on
<toolset>clang:<warnings-as-errors>on
@@ -60,8 +63,6 @@ build-project ../examples ;
run hash_reference_values.cpp ;
run detail_is_range_test.cpp ;
run detail_is_range_test2.cpp
: : : <toolset>gcc:<cxxflags>-Wno-variadic-macros <toolset>clang:<cxxflags>-Wno-variadic-macros ;
run detail_is_contiguous_range_test.cpp ;
run detail_is_unordered_range_test.cpp ;
@@ -73,4 +74,5 @@ run hash_number_test2.cpp ;
run hash_integral_test.cpp ;
run hash_string_test2.cpp ;
run hash_fs_path_test.cpp /boost//filesystem/<warnings>off : : : <toolset>gcc:<cxxflags>-Wno-variadic-macros <toolset>clang:<cxxflags>-Wno-variadic-macros ;
run hash_fs_path_test.cpp /boost//filesystem/<warnings>off ;
run detail_is_range_test2.cpp ;

View File

@@ -6,8 +6,8 @@
# pragma warning(disable: 4714) // forceinline not inlined
#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wsign-conversion"
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wsign-conversion"
#endif
#include <boost/container_hash/detail/is_range.hpp>

View File

@@ -6,8 +6,8 @@
# pragma warning(disable: 4714) // forceinline not inlined
#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wsign-conversion"
#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wsign-conversion"
#endif
#include <boost/filesystem/path.hpp>

View File

@@ -9,11 +9,12 @@
#include <set>
#if defined(BOOST_MSVC)
#pragma warning(disable:4244) // conversion from int to float
# pragma warning(disable: 4244) // conversion from int to float
#endif
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic ignored "-Wconversion"
# pragma GCC diagnostic ignored "-Wconversion"
# pragma GCC diagnostic ignored "-Wsign-conversion"
#endif
// This test checks for collisions in a small range of numbers