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

Coverity static analysis defects (Trac ticket #13331) #19

Closed
mloskot opened this issue Sep 21, 2018 · 7 comments
Closed

Coverity static analysis defects (Trac ticket #13331) #19

mloskot opened this issue Sep 21, 2018 · 7 comments

Comments

@mloskot
Copy link
Member

mloskot commented Sep 21, 2018

(copied from https://svn.boost.org/trac10/ticket/13331, only Function's parts from the attached report)

Boost 1.57.0

A static analysis tool called Coverity found medium and high defects in the boost source code. See attached file for defect type, defect category, filename and line number of defect.

Defect Type Defect Category Line Number Filename
Same on both sides Incorrect expression 939 /boost/include/boost/function/function_template.hpp
@mclow
Copy link
Contributor

mclow commented Sep 21, 2018

I think we need more information here; there's already a Coverity warning suppression here (line 938), and the code on 939 doesn't have a "both sides"; it's an if (expr && expr && expr) expression.

    // coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
    if (boost::has_trivial_copy_constructor<Functor>::value &&
        boost::has_trivial_destructor<Functor>::value &&
        boost::detail::function::function_allows_small_object_optimization<Functor>::value)

Alternately, this report refers to an older version of boost, where the code is different.

@mloskot
Copy link
Member Author

mloskot commented Sep 21, 2018

I've copied the missing detail from the Track ticket: it was Boost 1.57.0

@mclow
Copy link
Contributor

mclow commented Sep 21, 2018

That's the same line in Boost 1.57.0, and the coverity suppression line was there as well in 1.57.0

@mloskot
Copy link
Member Author

mloskot commented Sep 21, 2018

Apparently, OP did not verified that. I have also failed to do so before copying the ticket.

I guess, this can be closed (the original Trac ticket has been closed).

@mclow
Copy link
Contributor

mclow commented Sep 21, 2018

Closing.

@mclow mclow closed this as completed Sep 21, 2018
@jeking3
Copy link
Contributor

jeking3 commented Sep 21, 2018

Coverity Scan runs regularly on this repository: https://scan.coverity.com/projects/boostorg-function

@mloskot
Copy link
Member Author

mloskot commented Sep 21, 2018

@mclow Thanks

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

3 participants