You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Ben Mahler <be...@gmail.com> on 2012/12/07 23:54:30 UTC
Review Request: Fixed a compiler warning on gcc 4.6.2
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8423/
-----------------------------------------------------------
Review request for mesos, Benjamin Hindman and Vinod Kone.
Description
-------
The following error was reported on the mailing list:
This is off of trunk; gcc version is 4.6.2.
Error message is "In function protobuf.hpp in function 'Result<bool> protobuf::read(int, google::protobuf::Message*)': ... protobuf.hpp:131:24: Comparison between signed and unsigned integer expressions [-Werror=signed-compare]"
Diffs
-----
third_party/libprocess/include/stout/protobuf.hpp d2b5daedb878fcf04bc38ba912ffc0ca9a930729
Diff: https://reviews.apache.org/r/8423/diff/
Testing
-------
make check
Thanks,
Ben Mahler
Re: Review Request: Fixed a compiler warning on gcc 4.6.2
Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8423/#review14764
-----------------------------------------------------------
Ship it!
Ship It!
- Benjamin Hindman
On Dec. 12, 2012, 7:55 p.m., Ben Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8423/
> -----------------------------------------------------------
>
> (Updated Dec. 12, 2012, 7:55 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Vinod Kone.
>
>
> Description
> -------
>
> The following error was reported on the mailing list:
>
> This is off of trunk; gcc version is 4.6.2.
>
> Error message is "In function protobuf.hpp in function 'Result<bool> protobuf::read(int, google::protobuf::Message*)': ... protobuf.hpp:131:24: Comparison between signed and unsigned integer expressions [-Werror=signed-compare]"
>
>
> Diffs
> -----
>
> third_party/libprocess/include/stout/os.hpp 76e5e0624af36a0021755fb4acf7f76bfb81a823
> third_party/libprocess/include/stout/protobuf.hpp d2b5daedb878fcf04bc38ba912ffc0ca9a930729
>
> Diff: https://reviews.apache.org/r/8423/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Ben Mahler
>
>
Re: Review Request: Fixed a compiler warning on gcc 4.6.2
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8423/
-----------------------------------------------------------
(Updated Dec. 12, 2012, 7:55 p.m.)
Review request for mesos, Benjamin Hindman and Vinod Kone.
Changes
-------
Added TODOs to fix buggy reads/writes.
Changed the cast.
Description
-------
The following error was reported on the mailing list:
This is off of trunk; gcc version is 4.6.2.
Error message is "In function protobuf.hpp in function 'Result<bool> protobuf::read(int, google::protobuf::Message*)': ... protobuf.hpp:131:24: Comparison between signed and unsigned integer expressions [-Werror=signed-compare]"
Diffs (updated)
-----
third_party/libprocess/include/stout/os.hpp 76e5e0624af36a0021755fb4acf7f76bfb81a823
third_party/libprocess/include/stout/protobuf.hpp d2b5daedb878fcf04bc38ba912ffc0ca9a930729
Diff: https://reviews.apache.org/r/8423/diff/
Testing
-------
make check
Thanks,
Ben Mahler
Re: Review Request: Fixed a compiler warning on gcc 4.6.2
Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8423/#review14192
-----------------------------------------------------------
Ship it!
Ship It!
- Vinod Kone
On Dec. 7, 2012, 10:54 p.m., Ben Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8423/
> -----------------------------------------------------------
>
> (Updated Dec. 7, 2012, 10:54 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Vinod Kone.
>
>
> Description
> -------
>
> The following error was reported on the mailing list:
>
> This is off of trunk; gcc version is 4.6.2.
>
> Error message is "In function protobuf.hpp in function 'Result<bool> protobuf::read(int, google::protobuf::Message*)': ... protobuf.hpp:131:24: Comparison between signed and unsigned integer expressions [-Werror=signed-compare]"
>
>
> Diffs
> -----
>
> third_party/libprocess/include/stout/protobuf.hpp d2b5daedb878fcf04bc38ba912ffc0ca9a930729
>
> Diff: https://reviews.apache.org/r/8423/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Ben Mahler
>
>
Re: Review Request: Fixed a compiler warning on gcc 4.6.2
Posted by Ben Mahler <be...@gmail.com>.
> On Dec. 12, 2012, midnight, Benjamin Hindman wrote:
> > third_party/libprocess/include/stout/protobuf.hpp, line 125
> > <https://reviews.apache.org/r/8423/diff/1/?file=235911#file235911line125>
> >
> > As you mention, if this is an EINTR then we can retry, so feel free to add a TODO to do this at some point.
"POSIX allows a read() that is interrupted after reading some data to return -1 (with errno set to EINTR) or to return the number of bytes already read."
Therefore, we need to handle both EINTR and partial reads (with a read loop).
Pushing this into os.hpp read/write helpers would make things easier (I see the same mistake made there).
Added TODOs for now, and at some point I'd like to fix these.
Likewise for write:
"Conforming to
SVr4, 4.3BSD, POSIX.1-2001.
Under SVr4 a write may be interrupted and return EINTR at any point, not just before any data is written.
Notes
<snip>
If a write() is interrupted by a signal handler before any bytes are written, then the call fails with the error EINTR; if it is interrupted after at least one byte has been written, the call succeeds, and returns the number of bytes written."
- Ben
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8423/#review14334
-----------------------------------------------------------
On Dec. 7, 2012, 10:54 p.m., Ben Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8423/
> -----------------------------------------------------------
>
> (Updated Dec. 7, 2012, 10:54 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Vinod Kone.
>
>
> Description
> -------
>
> The following error was reported on the mailing list:
>
> This is off of trunk; gcc version is 4.6.2.
>
> Error message is "In function protobuf.hpp in function 'Result<bool> protobuf::read(int, google::protobuf::Message*)': ... protobuf.hpp:131:24: Comparison between signed and unsigned integer expressions [-Werror=signed-compare]"
>
>
> Diffs
> -----
>
> third_party/libprocess/include/stout/protobuf.hpp d2b5daedb878fcf04bc38ba912ffc0ca9a930729
>
> Diff: https://reviews.apache.org/r/8423/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Ben Mahler
>
>
Re: Review Request: Fixed a compiler warning on gcc 4.6.2
Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8423/#review14334
-----------------------------------------------------------
third_party/libprocess/include/stout/protobuf.hpp
<https://reviews.apache.org/r/8423/#comment30521>
As you mention, if this is an EINTR then we can retry, so feel free to add a TODO to do this at some point.
third_party/libprocess/include/stout/protobuf.hpp
<https://reviews.apache.org/r/8423/#comment30520>
I think casting the unsigned thing to a signed thing instead of possibly lossing the signded'ness might be the better approach.
- Benjamin Hindman
On Dec. 7, 2012, 10:54 p.m., Ben Mahler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8423/
> -----------------------------------------------------------
>
> (Updated Dec. 7, 2012, 10:54 p.m.)
>
>
> Review request for mesos, Benjamin Hindman and Vinod Kone.
>
>
> Description
> -------
>
> The following error was reported on the mailing list:
>
> This is off of trunk; gcc version is 4.6.2.
>
> Error message is "In function protobuf.hpp in function 'Result<bool> protobuf::read(int, google::protobuf::Message*)': ... protobuf.hpp:131:24: Comparison between signed and unsigned integer expressions [-Werror=signed-compare]"
>
>
> Diffs
> -----
>
> third_party/libprocess/include/stout/protobuf.hpp d2b5daedb878fcf04bc38ba912ffc0ca9a930729
>
> Diff: https://reviews.apache.org/r/8423/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Ben Mahler
>
>