Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53659 - in trunk: boost/python/detail libs/python/src libs/python/src/object
From: dave_at_[hidden]
Date: 2009-06-05 16:15:02


Author: dave
Date: 2009-06-05 16:15:01 EDT (Fri, 05 Jun 2009)
New Revision: 53659
URL: http://svn.boost.org/trac/boost/changeset/53659

Log:
GCC Warning Suppression

Text files modified:
   trunk/boost/python/detail/decorated_type_id.hpp | 4 ++--
   trunk/libs/python/src/object/class.cpp | 9 ++++-----
   trunk/libs/python/src/object/function.cpp | 2 +-
   trunk/libs/python/src/object/function_doc_signature.cpp | 6 +++---
   trunk/libs/python/src/str.cpp | 2 +-
   5 files changed, 11 insertions(+), 12 deletions(-)

Modified: trunk/boost/python/detail/decorated_type_id.hpp
==============================================================================
--- trunk/boost/python/detail/decorated_type_id.hpp (original)
+++ trunk/boost/python/detail/decorated_type_id.hpp 2009-06-05 16:15:01 EDT (Fri, 05 Jun 2009)
@@ -55,8 +55,8 @@
 inline bool decorated_type_info::operator<(decorated_type_info const& rhs) const
 {
     return m_decoration < rhs.m_decoration
- || m_decoration == rhs.m_decoration
- && m_base_type < rhs.m_base_type;
+ || (m_decoration == rhs.m_decoration
+ && m_base_type < rhs.m_base_type);
 }
 
 inline bool decorated_type_info::operator==(decorated_type_info const& rhs) const

Modified: trunk/libs/python/src/object/class.cpp
==============================================================================
--- trunk/libs/python/src/object/class.cpp (original)
+++ trunk/libs/python/src/object/class.cpp 2009-06-05 16:15:01 EDT (Fri, 05 Jun 2009)
@@ -506,13 +506,12 @@
       // Build a tuple of the base Python type objects. If no bases
       // were declared, we'll use our class_type() as the single base
       // class.
- std::size_t const num_bases = (std::max)(num_types - 1, static_cast<std::size_t>(1));
- assert(num_bases <= ssize_t_max);
- handle<> bases(PyTuple_New(static_cast<ssize_t>(num_bases)));
+ ssize_t const num_bases = (std::max)(num_types - 1, static_cast<std::size_t>(1));
+ handle<> bases(PyTuple_New(num_bases));
 
- for (std::size_t i = 1; i <= num_bases; ++i)
+ for (ssize_t i = 1; i <= num_bases; ++i)
       {
- type_handle c = (i >= num_types) ? class_type() : get_class(types[i]);
+ type_handle c = (i >= static_cast<ssize_t>(num_types)) ? class_type() : get_class(types[i]);
           // PyTuple_SET_ITEM steals this reference
           PyTuple_SET_ITEM(bases.get(), static_cast<ssize_t>(i - 1), upcast<PyObject>(c.release()));
       }

Modified: trunk/libs/python/src/object/function.cpp
==============================================================================
--- trunk/libs/python/src/object/function.cpp (original)
+++ trunk/libs/python/src/object/function.cpp 2009-06-05 16:15:01 EDT (Fri, 05 Jun 2009)
@@ -166,7 +166,7 @@
                     else
                     {
                         // build a new arg tuple, will adjust its size later
- assert(max_arity <= ssize_t_max);
+ assert(max_arity <= static_cast<std::size_t>(ssize_t_max));
                         inner_args = handle<>(
                             PyTuple_New(static_cast<ssize_t>(max_arity)));
 

Modified: trunk/libs/python/src/object/function_doc_signature.cpp
==============================================================================
--- trunk/libs/python/src/object/function_doc_signature.cpp (original)
+++ trunk/libs/python/src/object/function_doc_signature.cpp 2009-06-05 16:15:01 EDT (Fri, 05 Jun 2009)
@@ -52,9 +52,9 @@
             //check if the argument default values are the same
             bool f1_has_names = bool(f1->m_arg_names);
             bool f2_has_names = bool(f2->m_arg_names);
- if ( f1_has_names && f2_has_names && f2->m_arg_names[i-1]!=f1->m_arg_names[i-1]
- || f1_has_names && !f2_has_names
- || !f1_has_names && f2_has_names && f2->m_arg_names[i-1]!=python::object()
+ if ( (f1_has_names && f2_has_names && f2->m_arg_names[i-1]!=f1->m_arg_names[i-1])
+ || (f1_has_names && !f2_has_names)
+ || (!f1_has_names && f2_has_names && f2->m_arg_names[i-1]!=python::object())
                 )
                 return false;
         }

Modified: trunk/libs/python/src/str.cpp
==============================================================================
--- trunk/libs/python/src/str.cpp (original)
+++ trunk/libs/python/src/str.cpp 2009-06-05 16:15:01 EDT (Fri, 05 Jun 2009)
@@ -26,7 +26,7 @@
 
     ssize_t str_size_as_py_ssize_t(std::size_t n)
     {
- if (n > ssize_t_max)
+ if (n > static_cast<std::size_t>(ssize_t_max))
       {
           throw std::range_error("str size > ssize_t_max");
       }


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