Opened 7 years ago
Closed 7 years ago
#11765 closed Bugs (fixed)
boost_1_59_0/boost/intrusive/sgtree.hpp:830: bad if test ?
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | intrusive |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: | dcb314@… |
Description
[boost_1_59_0/boost/intrusive/sgtree.hpp:830]: (warning) Logical conjunction always evaluates to false: new_alpha < 0.5f && new_alpha >= 1.0f.
Source code is
if(new_alpha < 0.5f && new_alpha >= 1.0f) return;
Maybe better code
if(new_alpha < 0.5f new_alpha >= 1.0f) return;
Compiling with gcc flag -Wlogical-op might help find further examples of this problem.
Change History (2)
comment:1 by , 7 years ago
Component: | None → intrusive |
---|---|
Owner: | set to |
comment:2 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Thanks for the report. It seems that -Wlogical-op is not part of -Wall due to some false positives. Fixed in:
https://github.com/boostorg/intrusive/commit/259e4a939f3b69c79cd136d87f9f6479deb98104