Opened 13 years ago

Closed 13 years ago

#3755 closed Patches (fixed)

Warning comparison between signed and unsigned integer in asserts

Reported by: Dean Michael Berris Owned by: Robert Ramey
Milestone: Boost 1.42.0 Component: serialization
Version: Boost Development Trunk Severity: Problem
Keywords: Cc: Dean Michael Berris

Description

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.

Attachments (1)

boost-serialization-unsigned-signed-comparison-warning-fix-3755.diff (1.4 KB ) - added by Dean Michael Berris 13 years ago.
Proposed patch.

Download all attachments as: .zip

Change History (2)

by Dean Michael Berris, 13 years ago

Proposed patch.

comment:1 by Robert Ramey, 13 years ago

Resolution: fixed
Status: newclosed

OK, rolled it into my local copy

Robert Ramey

Note: See TracTickets for help on using tickets.