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 2017/12/20 03:41:51 UTC

Review Request 64732: Fixed conversion warnings in tests.

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

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


Repository: mesos


Description
-------

The signature of `flags.load` takes an `int`, but
`arraySize` (correctly) returns a `size_t`. We don't want to change
`flags.load` to take a `size_t` because its signature is `int argc,
char** argv`, and so we may be sending it `int` in other places.

As all the test arrays are statically sized, we know that we're not
overflowing an `int`, so it is safe to just `static_cast<int>` here.


Diffs
-----

  3rdparty/stout/tests/flags_tests.cpp 60ed8ebdd7b491e0d9469985f6263aad64b44c51 
  3rdparty/stout/tests/subcommand_tests.cpp 54d70c99083fc1de16c732917e1faf1ee59ef646 


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


Testing
-------

These are in stout.


Thanks,

Andrew Schwartzmeyer


Re: Review Request 64732: Fixed conversion warnings in tests.

Posted by Joseph Wu <jo...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64732/#review194912
-----------------------------------------------------------


Ship it!




Ship It!

- Joseph Wu


On Jan. 5, 2018, 1:53 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64732/
> -----------------------------------------------------------
> 
> (Updated Jan. 5, 2018, 1:53 p.m.)
> 
> 
> Review request for mesos, Greg Mann, Jie Yu, Joseph Wu, and Michael Park.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The signature of `flags.load` takes an `int`, but
> `arraySize` (correctly) returns a `size_t`. We don't want to change
> `flags.load` to take a `size_t` because its signature is `int argc,
> char** argv`, and so we may be sending it `int` in other places.
> 
> As all the test arrays are statically sized, we know that we're not
> overflowing an `int`, so it is safe to just `static_cast<int>` here.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/tests/flags_tests.cpp 60ed8ebdd7b491e0d9469985f6263aad64b44c51 
>   3rdparty/stout/tests/subcommand_tests.cpp 54d70c99083fc1de16c732917e1faf1ee59ef646 
> 
> 
> Diff: https://reviews.apache.org/r/64732/diff/2/
> 
> 
> Testing
> -------
> 
> These are in stout.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Re: Review Request 64732: Fixed conversion warnings in tests.

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

(Updated Jan. 9, 2018, 11:08 a.m.)


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


Changes
-------

Rebased.


Repository: mesos


Description
-------

The signature of `flags.load` takes an `int`, but
`arraySize` (correctly) returns a `size_t`. We don't want to change
`flags.load` to take a `size_t` because its signature is `int argc,
char** argv`, and so we may be sending it `int` in other places.

As all the test arrays are statically sized, we know that we're not
overflowing an `int`, so it is safe to just `static_cast<int>` here.


Diffs (updated)
-----

  3rdparty/stout/tests/flags_tests.cpp 60ed8ebdd7b491e0d9469985f6263aad64b44c51 
  3rdparty/stout/tests/subcommand_tests.cpp 54d70c99083fc1de16c732917e1faf1ee59ef646 


Diff: https://reviews.apache.org/r/64732/diff/3/

Changes: https://reviews.apache.org/r/64732/diff/2-3/


Testing
-------

These are in stout.


Thanks,

Andrew Schwartzmeyer


Re: Review Request 64732: Fixed conversion warnings in tests.

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

(Updated Jan. 5, 2018, 1:53 p.m.)


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


Changes
-------

Rebased.


Repository: mesos


Description
-------

The signature of `flags.load` takes an `int`, but
`arraySize` (correctly) returns a `size_t`. We don't want to change
`flags.load` to take a `size_t` because its signature is `int argc,
char** argv`, and so we may be sending it `int` in other places.

As all the test arrays are statically sized, we know that we're not
overflowing an `int`, so it is safe to just `static_cast<int>` here.


Diffs (updated)
-----

  3rdparty/stout/tests/flags_tests.cpp 60ed8ebdd7b491e0d9469985f6263aad64b44c51 
  3rdparty/stout/tests/subcommand_tests.cpp 54d70c99083fc1de16c732917e1faf1ee59ef646 


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

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


Testing
-------

These are in stout.


Thanks,

Andrew Schwartzmeyer