----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56592/#review165879 -----------------------------------------------------------
Fix it, then Ship it! 3rdparty/libprocess/include/process/network.hpp (line 50) <https://reviews.apache.org/r/56592/#comment237712> Note: This is a note, rather than an issue. This is an implicit cast from `size_t` (usually uint64_t) to `socklen_t` (usually uint32_t). As a down-cast, we may sometimes want to check against `std::numeric_limits`, but in this case we don't need to. `Address::size` is the amount of bytes a socket address struct requires. If we actually had a struct bigger than 4GB, there would be much more fundamental issues to solve :D So this line LGTM. 3rdparty/libprocess/src/encoder.hpp (line 247) <https://reviews.apache.org/r/56592/#comment237724> For an unsigned -> signed (size_t -> off_t) cast, we need to check if `size < std::numeric_limits<off_t>::max()`. I plan to add this to the constructor: ``` // NOTE: For files, we expect the size to be derived from `stat`-ing // the file. The `struct stat` returns the size in `off_t` form, // meaning that it is a programmer error to construct the `FileEncoder` // with a size greater the max value of `off_t`. CHECK_LE(_size, std::numeric_limits<off_t>::max()); ``` - Joseph Wu On Feb. 14, 2017, 12:58 a.m., Alex Clemmer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/56592/ > ----------------------------------------------------------- > > (Updated Feb. 14, 2017, 12:58 a.m.) > > > Review request for mesos, Andrew Schwartzmeyer, Daniel Pravat, and Joseph Wu. > > > Repository: mesos > > > Description > ------- > > Libprocess: Removed MSVC compiler warnings. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/metrics/counter.hpp > a13cc7e18c8b23eae83c326d63874d9d2aaedc0d > 3rdparty/libprocess/include/process/network.hpp > 0590e7a67275b9e37af2a49c050daab5eeaee7a5 > 3rdparty/libprocess/src/encoder.hpp > b019bf90c0aabbce50d90f5ed6f3fd25d725e542 > > Diff: https://reviews.apache.org/r/56592/diff/ > > > Testing > ------- > > > Thanks, > > Alex Clemmer > >
