mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <>
Subject Review Request 64736: Fixed conversion warnings.
Date Wed, 20 Dec 2017 03:45:34 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for mesos, Greg Mann, Jie Yu, Joseph Wu, and Michael Park.

Repository: mesos


Fixed conversion warnings in `cram_md5` authentication. The potential
for overflow here is exceedingly unlikely, and we have been ignoring
these warnings to date without problem.

Fixed conversion warning in `files.cpp`. The signature accepts an
`off_t` type, but we calculated the offset from a `size_t`.

Fixed `size_t` to `int` warning in `default_executor.cpp`. The only use
of this counter is in `taskGroup.tasks().Get(index++)`, which expects an
`int`, so we changed the type.

Fixed conversion warnings in master. We can't change the return types
because the `Metric` class only accepts `double` types, so we
`static_cast` (as we were already doing elsewhere in the class).

Fixed warnings when converting to `pid_t` in the containerizer. Can't
change the arguments types because they're in the protocol, but they
obviously represent a `pid_t` originally, so this is a safe

Fixed warnings when constructing a `Seconds`a in `slave.cpp` as it takes
`int64_t`, but we're giving it a `double`. We can't change the `double`
because it's set in the protocol, and we're currently ignoring the
conversion anyway, so we just cast. We may want to provide a `double`
constructor for `Seconds` in the future that does proper rounding.

Fixed `size_t` to `int` conversion warning in `slave.cpp`. This counter
was only used in `usage->mutable_exedcutors(i++)` which expected an
`int`, so we changed the type.

Fixed conversion warnings in `zookeeper.cpp`. The signatures of these
functions take an `int`, and they're coming from a `size()`. We have
bigger problems if this overflows.


  src/authentication/cram_md5/authenticatee.cpp 7b3f767e29163de489018081089e67a6f22971c5 
  src/authentication/cram_md5/authenticator.cpp 2a12bb3f4aec79056ec6c82a8c896ee3af15bb4c 
  src/files/files.cpp ad2189b9f2b919eb2f70c738655fa6ecfaaa1b11 
  src/launcher/default_executor.cpp 6c88de413379d3b58f19a24ac0c2f43e38e85e54 
  src/master/master.hpp b800cda3c82ba7c471147889075cdc4f915f16b1 
  src/master/master.cpp cf8a22b636210e9f8d326592d8b64eab2c97caa4 
  src/master/registrar.cpp 488b0896b8bfbb02583d614376053bde35156dee 
  src/slave/containerizer/mesos/containerizer.cpp cddc6173d17c8bd2585899b154f976c3822dffdd

  src/slave/containerizer/mesos/isolators/posix.hpp caa282c95746e845992c971982892cf60c9b982c

  src/slave/containerizer/mesos/isolators/windows/cpu.cpp 6b376efa9ff88ff93ee3dc8441fae4cda109d55f

  src/slave/containerizer/mesos/isolators/windows/mem.cpp 64d11347d73328cb9665697b1ddd69a00276b51f

  src/slave/containerizer/mesos/launcher.cpp ec31fa24c8b91583b8b327a0c658ed6e87bd292f 
  src/slave/slave.cpp 55dea087acee299253ad1fac120e35653ca2c636 
  src/zookeeper/zookeeper.cpp 5ede4e5c47b30693ef9f296777dea8db2c4a48d8 



These are in Mesos.

Excluding 3rdparty:

On Windows 10:

Build succeeded.
    0 Warning(s)
    0 Error(s)

On CentOS 7, with Autotools:

make check

Passed. Also apparently -Wsign-compare is on, but not for Windows. Might re-evaluate our Windows
warning level. I'd like to turn -Werror on, but all the compilers generate different sets
of warnings :(


Andrew Schwartzmeyer

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message