Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static analyzer feedback on library for interested in. #1219

Open
dasfex opened this issue Dec 4, 2023 · 0 comments
Open

Static analyzer feedback on library for interested in. #1219

dasfex opened this issue Dec 4, 2023 · 0 comments

Comments

@dasfex
Copy link

dasfex commented Dec 4, 2023

I ran PVS Studio analyzer on boost/geometry and get some interesting points on library code:

/boost/geometry/include/boost/geometry/policies/relate/direction.hpp	184	err	V583 The '?:' operator, regardless of its conditional expression, always returns one and the same value: -1.
/boost/geometry/include/boost/geometry/formulas/karney_inverse.hpp	373	err	V547 Expression 'iteration < max_iterations' is always true.
/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp	426	warn	V560 A part of conditional expression is always false: pk_q1 > 0.
/boost/geometry/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp	437	warn	V560 A part of conditional expression is always false: pk_q1 < 0.
/boost/geometry/include/boost/geometry/algorithms/detail/within/multi_point.hpp	154	warn	V547 Expression 'in_val >= 0' is always true.
/boost/geometry/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp	233	warn	V649 There are two 'if' statements with identical conditional expressions. The first 'if' statement contains function return. This means that the second 'if' statement is senseless. Check lines: 220, 233.
/boost/geometry/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp	383	warn	V649 There are two 'if' statements with identical conditional expressions. The first 'if' statement contains function return. This means that the second 'if' statement is senseless. Check lines: 371, 383.
/boost/geometry/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp	420	warn	V649 There are two 'if' statements with identical conditional expressions. The first 'if' statement contains function return. This means that the second 'if' statement is senseless. Check lines: 407, 420.
/boost/geometry/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp	158	warn	V649 There are two 'if' statements with identical conditional expressions. The first 'if' statement contains function return. This means that the second 'if' statement is senseless. Check lines: 139, 158.
/boost/geometry/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp	316	warn	V560 A part of conditional expression is always true: !is_dissolve.
/boost/geometry/include/boost/geometry/algorithms/detail/is_simple/linear.hpp	73	err	V501 There are identical sub-expressions to the left and to the right of the '||' operator.
/boost/geometry/include/boost/geometry/algorithms/detail/touches/implementation.hpp	176	warn	V1037 Two or more case-branches perform the same actions. Check lines: 176, 181

Maybe someone would be interested in researching of that cases and will make a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant