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

FindCppcheck fails with cppcheck 1.5.3 #10

Closed
bdellegrazie opened this issue Feb 16, 2012 · 5 comments
Closed

FindCppcheck fails with cppcheck 1.5.3 #10

bdellegrazie opened this issue Feb 16, 2012 · 5 comments

Comments

@bdellegrazie
Copy link

Hi,

I'm using your cmake-modules to apply cppcheck to our sources (thanks!), however I found a small issue when using cppcheck version 1.5.3.

In cppcheck version 1.5.3, the unused functions test is enabled with: --enable=unusedFunction, however in your Findcppcheck.cmake module you have this as:
--enable=unusedFunctions
(note the additional 's').

I'm not sure what the earlier behaviour was but the current version does not work.
Since this is a trivial fix I haven't created a pull request, but I'll try putting a diff in an additional comment.

Thanks,
Brett

@bdellegrazie
Copy link
Author

diff --git a/Findcppcheck.cmake b/Findcppcheck.cmake
index 02d351b..cf81cd1 100644
-- a/Findcppcheck.cmake
++ b/Findcppcheck.cmake
@@ -103,7 +103,7 @@ if(CPPCHECK_EXECUTABLE)
    if("${CPPCHECK_STYLE_ARG}" STREQUAL "--enable=style")

        _cppcheck_set_arg_var(CPPCHECK_UNUSEDFUNC_ARG
-           "--enable=unusedFunctions")
+           "--enable=unusedFunction")
        _cppcheck_set_arg_var(CPPCHECK_INFORMATION_ARG "--enable=information")
        _cppcheck_set_arg_var(CPPCHECK_MISSINGINCLUDE_ARG
            "--enable=missingInclude")

@jklontz
Copy link

jklontz commented Mar 25, 2012

I experienced the same problem running cppcheck version 1.49. The above patch fixed it for me. Thanks!

@Micket
Copy link

Micket commented Dec 20, 2012

Thanks. I should have checked here before starting to debug myself. I too can confirm that the patch fixes 1.5.7.

@nmikhailov
Copy link

Year later, still not fixed. Above patch fixes 1.59 too.

@rpavlik
Copy link
Owner

rpavlik commented Apr 17, 2015

Would have been easier to not lose had it been a pull request, sorry. Looks like it got fixed.

@rpavlik rpavlik closed this as completed Apr 17, 2015
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

5 participants