[Boost-bugs] [Boost C++ Libraries] #3755: Warning comparison between signed and unsigned integer in asserts

Subject: [Boost-bugs] [Boost C++ Libraries] #3755: Warning comparison between signed and unsigned integer in asserts
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-12-11 19:58:16


#3755: Warning comparison between signed and unsigned integer in asserts
-------------------------------------+--------------------------------------
 Reporter: mikhailberis | Owner: ramey
     Type: Patches | Status: new
Milestone: Boost 1.42.0 | Component: serialization
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 There are a number of warnings that come up with Boost.Serialization in
 the assertions that deal with checking the number of bytes against the
 maximum value for an std::streamsize. The problem is that 'count' is a
 size_t (unsigned) while std::streamsize is signed.

 The attached patch goes around it by converting count to a std::streamsize
 in one place and the other converting the max of a std::streamsize to an
 std::size_t. I'm not sure if this is the right fix, would be good to know
 one way or another.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3755>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC