Skip to content

Closing Curly braces ("}") following return statements not ignored #129

Closed

Description

@bcaddy

I found that lcov is reporting lines with just a } that follow a return statement when they should just be excluded. I don't see this issue in other peoples coverage reports and lcov does appear to be excluding the opening { properly. What am I doing wrong?

last line issue

Activity

  1. henry2cox commented on Aug 17, 2021

    @henry2cox
    Collaborator
  2. bcaddy commented on Aug 17, 2021

    @bcaddy
    Author

    Thanks, is --filter merged into LCOV yet? It's not showing up as an option in my lcov install (v1.15) and I'm limited to officially released version on the systems I run on

  3. henry2cox commented on Aug 17, 2021

    @henry2cox
    Collaborator
  4. bcaddy commented on Aug 17, 2021

    @bcaddy
    Author

    Bummer, thanks for your help!

  5. FreddyFunk commented on Jan 7, 2023

    @FreddyFunk

    @bcaddy In case you still got this issue, try adding the compile options -fno-elide-constructors and -fno-default-inline in addition to -fprofile-arcs and -ftest-coverage as it may also help with coverage of "missing" constructors and inline functions. This fixed a similar issue for me when I was using GNU/GCC 11.3.

  6. bcaddy commented on Jan 9, 2023

    @bcaddy
    Author

    Thank you, I'll try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions