mirror of
https://github.com/boostorg/spirit.git
synced 2026-01-19 04:42:11 +00:00
Fix warning C4555: result of expression not used
This commit is contained in:
1
Jamfile
1
Jamfile
@@ -26,6 +26,7 @@ project spirit
|
||||
<warnings>extra,<toolset>clang-linux:<cxxflags>-Wshadow-field-in-constructor
|
||||
<warnings>extra,<toolset>clang-linux:<cxxflags>-Wshadow-uncaptured-local
|
||||
<warnings>extra,<toolset>clang-linux:<cxxflags>-Wundefined-reinterpret-cast
|
||||
<warnings>extra,<toolset>msvc:<cxxflags>-w44555 # result of expression not used
|
||||
|
||||
# Broken or very high false-positive rate
|
||||
<known-warnings>hide,<toolset>gcc:<cxxflags>-Wno-maybe-uninitialized # Too many pesky false-positives
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
|
||||
, Delimiter const& d, unused_type, bool&)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
(void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
#endif
|
||||
// return true if any of the generators succeed
|
||||
return component.generate(sink, ctx, d, unused);
|
||||
@@ -87,7 +87,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
|
||||
, Context& ctx, Delimiter const& d, Attribute const& attr, bool&)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
(void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
#endif
|
||||
return call(component, sink, ctx, d, attr
|
||||
, spirit::traits::not_is_variant_or_variant_in_optional<Attribute, karma::domain>());
|
||||
@@ -99,7 +99,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
|
||||
, Context& ctx, Delimiter const& d, Attribute const& attr, mpl::true_)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
(void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
#endif
|
||||
return component.generate(sink, ctx, d, attr);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
|
||||
, Context& ctx, Delimiter const& d, Attribute const& attr, mpl::false_)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
(void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
#endif
|
||||
typedef
|
||||
traits::compute_compatible_component<Expected, Attribute, domain>
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
|
||||
bool operator()(Component const& component, Attribute const& attr) const
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
(void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
#endif
|
||||
// return true if any of the generators fail
|
||||
return !component.generate(sink, ctx, delim, attr);
|
||||
@@ -40,7 +40,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail
|
||||
bool operator()(Component const& component) const
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
(void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
#endif
|
||||
// return true if any of the generators fail
|
||||
return !component.generate(sink, ctx, delim, unused);
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace boost { namespace spirit { namespace karma
|
||||
unsigned int const width, Padding const& p)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
e; // suppresses warning: C4100: 'e' : unreferenced formal parameter
|
||||
(void)e; // suppresses warning: C4100: 'e' : unreferenced formal parameter
|
||||
#endif
|
||||
// wrap the given output iterator to allow left padding
|
||||
detail::enable_buffering<OutputIterator> buffering(sink, width);
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace boost { namespace spirit { namespace karma
|
||||
unsigned int const width, Padding const& p)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
e; // suppresses warning: C4100: 'e' : unreferenced formal parameter
|
||||
(void)e; // suppresses warning: C4100: 'e' : unreferenced formal parameter
|
||||
#endif
|
||||
// wrap the given output iterator to allow counting
|
||||
detail::enable_counting<OutputIterator> counting(sink);
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace boost { namespace spirit { namespace karma
|
||||
unsigned int const maxwidth, Rest& restdest)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
e; // suppresses warning: C4100: 'e' : unreferenced formal parameter
|
||||
(void)e; // suppresses warning: C4100: 'e' : unreferenced formal parameter
|
||||
#endif
|
||||
// wrap the given output iterator to allow buffering, but disable
|
||||
// counting
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace boost { namespace spirit { namespace karma
|
||||
unsigned int const width, Padding const& p)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
e; // suppresses warning: C4100: 'e' : unreferenced formal parameter
|
||||
(void)e; // suppresses warning: C4100: 'e' : unreferenced formal parameter
|
||||
#endif
|
||||
// wrap the given output iterator to allow left padding
|
||||
detail::enable_buffering<OutputIterator> buffering(sink, width);
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace boost { namespace spirit { namespace karma
|
||||
call (OutputIterator& sink, U b, Policies const& p = Policies())
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
p; // suppresses warning: C4100: 'p' : unreferenced formal parameter
|
||||
(void)p; // suppresses warning: C4100: 'p' : unreferenced formal parameter
|
||||
#endif
|
||||
return p.template call<bool_inserter>(sink, T(b), p);
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace boost { namespace spirit { namespace karma
|
||||
call_n (OutputIterator& sink, U b, Policies const& p)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
p; // suppresses warning: C4100: 'p' : unreferenced formal parameter
|
||||
(void)p; // suppresses warning: C4100: 'p' : unreferenced formal parameter
|
||||
#endif
|
||||
if (b)
|
||||
return p.template generate_true<CharEncoding, Tag>(sink, b);
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
return false;
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
p; // suppresses warning: C4100: 'p' : unreferenced formal parameter
|
||||
(void)p; // suppresses warning: C4100: 'p' : unreferenced formal parameter
|
||||
#endif
|
||||
return (allow_true && p.parse_true(first, last, attr)) ||
|
||||
(!disallow_false && p.parse_false(first, last, attr));
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace boost { namespace spirit { namespace qi
|
||||
, str_hi(in)
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
encoding; // suppresses warning: C4100: 'encoding' : unreferenced formal parameter
|
||||
(void)encoding; // suppresses warning: C4100: 'encoding' : unreferenced formal parameter
|
||||
#endif
|
||||
typename string_type::iterator loi = str_lo.begin();
|
||||
typename string_type::iterator hii = str_hi.begin();
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace boost { namespace spirit { namespace detail
|
||||
void operator()(Component const& component) const
|
||||
{
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
|
||||
component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
(void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
|
||||
#endif
|
||||
boost::get<std::list<info> >(what.value).
|
||||
push_back(component.what(context));
|
||||
|
||||
Reference in New Issue
Block a user