Please open a new discussion topic if you want to request a new check. The problem here is that we can't be sure if the parameters are intended to be passed that way. It looks like a possible mistake but how can we know it is a mistake. If this is added I think we'll need to carefully test it and probably add some further heuristics..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not sure this is the right place to post this but I'm having trouble to register and logging into webchat to ask for a TRAC account.
With latest nighty build I get many : error: Found a exit path from function with non-void return type that has missing return statement [missingReturn] that I did not get on previous version of Cppcheck.
For Unit test purposes I have to use a defined STATIC in order to test functions as non static on my tests and keep them static on my final code :
I don't want that we report random bugs in this discussion "cppcheck-2.6". If it's a regression in cppcheck-2.6 fine! Or something that is totally broken and have to be fixed.
Please feel free to open new discussion topics to report random bugs..
Last edit: Daniel Marjamäki 2021-09-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I got false detect with cppcheck: warning: Return value of function logf() is not used. [ignoredReturnValue]
But function void logf(const char* format, ...)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Daniel. The only issue that bothers me at the moment is a misra.py bailout, described here: https://trac.cppcheck.net/ticket/10481
But I don't know if its worth to delay the release. It's up to you...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did run a flame graph with match compiler on and a release build but it isn't very useful. The function you would want to know the name of is showing up as unknown. I will dig through the flags and see if I can get more useful data. I will do a follow up in a new thread.
Do you think its possible to move the release notes into the git repo? This will allow others to contribute the release notes(just in case you missed something).
Ideally we could build the file incrementally as new features are added instead of accounting for features at release time. This is similar to clang-tidy's release notes which are updated as changes are made:
That sounds good to me. I'd still assume we need to tweak this during release but then the community has the possibility to edit it during development.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That would be nice to also add the new misra rules on this file or another one to check which new rules are added. I sometimes compare on your sourceforge page but there is no history there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For rule 17.3 I am not sure if we will implement that in the addon. I rather not require that real system headers are included in the analysis. I guess we can implement a rough analysis though without system headers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please open a new discussion topic if you want to request a new check. The problem here is that we can't be sure if the parameters are intended to be passed that way. It looks like a possible mistake but how can we know it is a mistake. If this is added I think we'll need to carefully test it and probably add some further heuristics..
cppcheck created for detect only "100% error found" and "possible error" not adding to cppcheck ?
more about our philosophy.. https://github.com/danmar/cppcheck/blob/main/philosophy.md
Stylistic checks must have a very low noise ratio. It's not enough that the code looks suspicious.
I'm not sure this is the right place to post this but I'm having trouble to register and logging into webchat to ask for a TRAC account.
With latest nighty build I get many :
error: Found a exit path from function with non-void return type that has missing return statement [missingReturn]
that I did not get on previous version of Cppcheck.For Unit test purposes I have to use a defined
STATIC
in order to test functions as non static on my tests and keep themstatic
on my final code :The errors are triggered by this kind of functions :
STATIC void MyFunction(void)
Do you think this could/should be solved before next release ?
Please let me know if I should create another topic for this.*
EDIT :
My bad, this was related to my folder structure : I had a wrong relative path to the header that define STATIC.
Sorry for the inconvenience.
Last edit: Julien 2021-08-30
I anyway think that the check could make a more intelligent guess here. It could guess that
UNKNOWN_MACRO void f()
does not return a value.I found false detects from cppcheck engine https://github.com/danmar/cppcheck/pull/3431#issuecomment-911434094
if (name1==name2)
....
do something with name1 or name2
...
if (name1==name2)
cppcheck writing something like
"name1==name2" always false
Last edit: Absol 2021-09-02
I don't want that we report random bugs in this discussion "cppcheck-2.6". If it's a regression in cppcheck-2.6 fine! Or something that is totally broken and have to be fixed.
Please feel free to open new discussion topics to report random bugs..
Last edit: Daniel Marjamäki 2021-09-02
I don't know how to open new discussion on sourceforge
I got false detect with cppcheck:
warning: Return value of function logf() is not used. [ignoredReturnValue]
But function void logf(const char* format, ...)
I got false positive with simple enum:
In 'main' branch cppcheck from github.
Last edit: Absol 2021-09-11
I found another false positive in one opensource code.
Last edit: Absol 2021-09-10
I think second false detect (with enum) only in Windows
I believe that Cppcheck is sufficiently stable now.
I suggest that I make a release candidate for Cppcheck-2.6 tomorrow. Or does anybody want more time?
Do you see some bugs that you think are critical to fixed?
We can wait a week or two if there is a good reason..
Thanks Daniel. The only issue that bothers me at the moment is a misra.py bailout, described here: https://trac.cppcheck.net/ticket/10481
But I don't know if its worth to delay the release. It's up to you...
That seems critical I will fix that.
I did run a flame graph with match compiler on and a release build but it isn't very useful. The function you would want to know the name of is showing up as unknown. I will dig through the flags and see if I can get more useful data. I will do a follow up in a new thread.
I have tagged 2.6-rc1. Windows installer: https://github.com/danmar/cppcheck/actions/runs/1275403308
Source code:
https://github.com/danmar/cppcheck/tree/2.6-rc1
Do you think its possible to move the release notes into the git repo? This will allow others to contribute the release notes(just in case you missed something).
Ideally we could build the file incrementally as new features are added instead of accounting for features at release time. This is similar to clang-tidy's release notes which are updated as changes are made:
https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/docs/ReleaseNotes.rst
What do you think?
That sounds good to me. I'd still assume we need to tweak this during release but then the community has the possibility to edit it during development.
That would be nice to also add the new misra rules on this file or another one to check which new rules are added. I sometimes compare on your sourceforge page but there is no history there.
The release notes will definitely mention misra this time. They will say something like:
For rule 17.3 I am not sure if we will implement that in the addon. I rather not require that real system headers are included in the analysis. I guess we can implement a rough analysis though without system headers.
Sure, sounds good. Are you able to push the current release notes you have? And then others can contribute more as they see fit.
I have not started writing the release notes.
I have added the file: cppcheck/releasenotes.txt
in main branch => release notes for 2.7
in 2.6.x branch => release notes for 2.6
feel free to contribute.