|
Boost-Commit : |
From: hartmut.kaiser_at_[hidden]
Date: 2008-04-26 21:00:35
Author: hkaiser
Date: 2008-04-26 21:00:34 EDT (Sat, 26 Apr 2008)
New Revision: 44793
URL: http://svn.boost.org/trac/boost/changeset/44793
Log:
Spirit: suppressed more VC level 4 warnings
Text files modified:
trunk/boost/spirit/home/karma/detail/output_iterator.hpp | 6 ++++++
trunk/boost/spirit/home/karma/detail/string_generate.hpp | 8 ++------
trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp | 11 +++++++++++
trunk/boost/spirit/home/support/detail/hold_any.hpp | 8 ++++----
trunk/libs/spirit/test/karma/real_numerics.cpp | 6 +++---
trunk/libs/spirit/test/karma/test.hpp | 3 +++
trunk/libs/spirit/test/support/hold_any.cpp | 4 ++--
7 files changed, 31 insertions(+), 15 deletions(-)
Modified: trunk/boost/spirit/home/karma/detail/output_iterator.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/output_iterator.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/output_iterator.hpp 2008-04-26 21:00:34 EDT (Sat, 26 Apr 2008)
@@ -169,6 +169,9 @@
private:
output_iterator& parent;
+
+ // suppress warning about assignment operator not being generated
+ output_proxy& operator=(output_proxy const&);
};
#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
@@ -260,6 +263,9 @@
counting_sink count_data; // for counting
buffer_sink<OutputIterator> buffer_data; // for buffering
output_mode mode;
+
+ // suppress warning about assignment operator not being generated
+ output_iterator& operator=(output_iterator const&);
};
///////////////////////////////////////////////////////////////////////////
Modified: trunk/boost/spirit/home/karma/detail/string_generate.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/string_generate.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/string_generate.hpp 2008-04-26 21:00:34 EDT (Sat, 26 Apr 2008)
@@ -22,8 +22,7 @@
inline bool
string_generate(OutputIterator& sink, Char const* str, unused_type = unused)
{
- Char ch;
- for (/**/; !!(ch = *str); ++str)
+ for (Char ch = *str; ch != 0; ch = *++str)
detail::generate_to(sink, ch);
return true;
}
@@ -53,11 +52,8 @@
inline bool
string_generate(OutputIterator& sink, Char const* str, Tag tag)
{
- Char ch;
- for (/**/; !!(ch = *str); ++str)
- {
+ for (Char ch = *str; ch != 0; ch = *++str)
detail::generate_to(sink, ch, tag);
- }
return true;
}
Modified: trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp 2008-04-26 21:00:34 EDT (Sat, 26 Apr 2008)
@@ -527,6 +527,12 @@
return call_n(sink, T(n), p);
}
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning(push)
+# pragma warning(disable: 4100) // 'x': unreferenced formal parameter
+# pragma warning(disable: 4127) // conditional expression is constant
+#endif
+
///////////////////////////////////////////////////////////////////////
// This is the workhorse behind the real generator
///////////////////////////////////////////////////////////////////////
@@ -617,6 +623,11 @@
}
return r;
}
+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# pragma warning(pop)
+#endif
+
};
}}}
Modified: trunk/boost/spirit/home/support/detail/hold_any.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/hold_any.hpp (original)
+++ trunk/boost/spirit/home/support/detail/hold_any.hpp 2008-04-26 21:00:34 EDT (Sat, 26 Apr 2008)
@@ -28,9 +28,9 @@
///////////////////////////////////////////////////////////////////////////////
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(push)
-#pragma warning(disable: 4100) // 'x': unreferenced formal parameter
-#pragma warning(disable: 4127) // conditional expression is constant
+# pragma warning(push)
+# pragma warning(disable: 4100) // 'x': unreferenced formal parameter
+# pragma warning(disable: 4127) // conditional expression is constant
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -419,7 +419,7 @@
///////////////////////////////////////////////////////////////////////////////
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
-#pragma warning(pop)
+# pragma warning(pop)
#endif
#endif
Modified: trunk/libs/spirit/test/karma/real_numerics.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/real_numerics.cpp (original)
+++ trunk/libs/spirit/test/karma/real_numerics.cpp 2008-04-26 21:00:34 EDT (Sat, 26 Apr 2008)
@@ -26,7 +26,7 @@
{
// we want the numbers always to be in scientific format
typedef boost::spirit::karma::real_generator_policies<T> base_type;
- static int floatfield(T n) { return base_type::scientific; }
+ static int floatfield(T) { return base_type::scientific; }
};
///////////////////////////////////////////////////////////////////////////////
@@ -37,7 +37,7 @@
typedef boost::spirit::karma::real_generator_policies<T> base_type;
// we want the numbers always to be in scientific format
- static int floatfield(T n) { return base_type::fixed; }
+ static int floatfield(T) { return base_type::fixed; }
};
///////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@
static bool const trailing_zeros = true;
// we want to generate up to 4 fractional digits
- static unsigned int precision(T n) { return 4; }
+ static unsigned int precision(T) { return 4; }
};
///////////////////////////////////////////////////////////////////////////////
Modified: trunk/libs/spirit/test/karma/test.hpp
==============================================================================
--- trunk/libs/spirit/test/karma/test.hpp (original)
+++ trunk/libs/spirit/test/karma/test.hpp 2008-04-26 21:00:34 EDT (Sat, 26 Apr 2008)
@@ -51,6 +51,9 @@
}
String& str;
+
+ // suppress warning about assignment operator not being generated
+ string_appender& operator=(string_appender const&);
};
template <typename String>
Modified: trunk/libs/spirit/test/support/hold_any.cpp
==============================================================================
--- trunk/libs/spirit/test/support/hold_any.cpp (original)
+++ trunk/libs/spirit/test/support/hold_any.cpp 2008-04-26 21:00:34 EDT (Sat, 26 Apr 2008)
@@ -118,7 +118,7 @@
struct small_object
{
small_object() {}
- small_object(small_object const& fb) { state = 1; }
+ small_object(small_object const&) { state = 1; }
~small_object() { state = 2; }
};
@@ -138,7 +138,7 @@
struct large_object
{
large_object() {}
- large_object(large_object const& fb) { state = 3; }
+ large_object(large_object const&) { state = 3; }
~large_object() { state = 4; }
int data0;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk