You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Andrew Schwartzmeyer <an...@schwartzmeyer.com> on 2018/01/24 21:48:49 UTC

Review Request 65326: Fixed conversion warning.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65326/
-----------------------------------------------------------

Review request for mesos and Benjamin Bannier.


Repository: mesos


Description
-------

A "possible loss of data" warning was introduced because `process.run()`
implicitly converts to an `int`. Since we have a finite set, we can
ignore this warning and so silence it with a `static_cast`.


Diffs
-----

  3rdparty/libprocess/src/tests/benchmarks.cpp 10fd492951fb1133d057eb3576f93a5f10e178f3 


Diff: https://reviews.apache.org/r/65326/diff/1/


Testing
-------


Thanks,

Andrew Schwartzmeyer


Re: Review Request 65326: Fixed conversion warning.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65326/#review196177
-----------------------------------------------------------



PASS: Mesos patch 65326 was successfully built and tested.

Reviews applied: `['65326']`

All the build artifacts available at: http://dcos-win.westus.cloudapp.azure.com/mesos-build/review/65326

- Mesos Reviewbot Windows


On Jan. 24, 2018, 2:16 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65326/
> -----------------------------------------------------------
> 
> (Updated Jan. 24, 2018, 2:16 p.m.)
> 
> 
> Review request for mesos and Benjamin Bannier.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> A "possible loss of data" warning was introduced because `process.run()`
> implicitly converts to an `int`. Since we have a finite set of ints,
> we can just use the `int` type.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/tests/benchmarks.cpp 10fd492951fb1133d057eb3576f93a5f10e178f3 
> 
> 
> Diff: https://reviews.apache.org/r/65326/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 65326: Fixed conversion warning.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65326/#review196178
-----------------------------------------------------------


Ship it!




I am not a native speaker, but maybe we could make the commit message clearer, e.g., something along the lines of

    Fixed a conversion warning.

    A "possible loss of data" warning was triggered with MSVC since
    `process.run(int)` implicitly converted an `unsigned` argument to
    `int`. This patch fixes the type of the passed values.

- Benjamin Bannier


On Jan. 24, 2018, 11:16 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65326/
> -----------------------------------------------------------
> 
> (Updated Jan. 24, 2018, 11:16 p.m.)
> 
> 
> Review request for mesos and Benjamin Bannier.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> A "possible loss of data" warning was introduced because `process.run()`
> implicitly converts to an `int`. Since we have a finite set of ints,
> we can just use the `int` type.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/tests/benchmarks.cpp 10fd492951fb1133d057eb3576f93a5f10e178f3 
> 
> 
> Diff: https://reviews.apache.org/r/65326/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 65326: Fixed conversion warning.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65326/
-----------------------------------------------------------

(Updated Jan. 24, 2018, 2:16 p.m.)


Review request for mesos and Benjamin Bannier.


Repository: mesos


Description (updated)
-------

A "possible loss of data" warning was introduced because `process.run()`
implicitly converts to an `int`. Sinnce we have a finite set, we can
ignore this warning and so silence it with a `static_cast`.


Diffs (updated)
-----

  3rdparty/libprocess/src/tests/benchmarks.cpp 10fd492951fb1133d057eb3576f93a5f10e178f3 


Diff: https://reviews.apache.org/r/65326/diff/2/

Changes: https://reviews.apache.org/r/65326/diff/1-2/


Testing
-------


Thanks,

Andrew Schwartzmeyer


Re: Review Request 65326: Fixed conversion warning.

Posted by Andrew Schwartzmeyer <an...@schwartzmeyer.com>.

> On Jan. 24, 2018, 1:56 p.m., Benjamin Bannier wrote:
> > 3rdparty/libprocess/src/tests/benchmarks.cpp
> > Line 677 (original), 677 (patched)
> > <https://reviews.apache.org/r/65326/diff/1/?file=1946064#file1946064line677>
> >
> >     We do not seem to depend on this being a `size_t`, so I'd suggest to adjust the type here instead of casting below.

I'm fine with that.


- Andrew


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65326/#review196171
-----------------------------------------------------------


On Jan. 24, 2018, 1:48 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65326/
> -----------------------------------------------------------
> 
> (Updated Jan. 24, 2018, 1:48 p.m.)
> 
> 
> Review request for mesos and Benjamin Bannier.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> A "possible loss of data" warning was introduced because `process.run()`
> implicitly converts to an `int`. Since we have a finite set, we can
> ignore this warning and so silence it with a `static_cast`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/tests/benchmarks.cpp 10fd492951fb1133d057eb3576f93a5f10e178f3 
> 
> 
> Diff: https://reviews.apache.org/r/65326/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 65326: Fixed conversion warning.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65326/#review196171
-----------------------------------------------------------




3rdparty/libprocess/src/tests/benchmarks.cpp
Line 677 (original), 677 (patched)
<https://reviews.apache.org/r/65326/#comment275699>

    We do not seem to depend on this being a `size_t`, so I'd suggest to adjust the type here instead of casting below.


- Benjamin Bannier


On Jan. 24, 2018, 10:48 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65326/
> -----------------------------------------------------------
> 
> (Updated Jan. 24, 2018, 10:48 p.m.)
> 
> 
> Review request for mesos and Benjamin Bannier.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> A "possible loss of data" warning was introduced because `process.run()`
> implicitly converts to an `int`. Since we have a finite set, we can
> ignore this warning and so silence it with a `static_cast`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/tests/benchmarks.cpp 10fd492951fb1133d057eb3576f93a5f10e178f3 
> 
> 
> Diff: https://reviews.apache.org/r/65326/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>