Re: Using static analysis to find (potential) bugs

2023-10-10 Thread Xiang Xiao
There are patch to integrate the CodeChecker into ci: https://github.com/apache/nuttx/pull/7114 https://github.com/apache/nuttx/pull/7090 you can follow them for cppcheck too. The hard problem is that tools normally report many false alarms which make it impractical to enable the check in ci/cd. O

Re: Using static analysis to find (potential) bugs

2023-10-10 Thread Gregory Nutt
I'm not the right guy to talk about CI,but I believe that every modified C file is run through Lint.  If you have questions, I am sure someone else can expound. On 10/10/2023 12:33 PM, Daniel Appiagyei wrote: Hey, I was running the [cppcheck](https://cppcheck.sourceforge.io/) static analysis t

Re: Using static analysis to find (potential) bugs

2023-10-10 Thread Gregory Nutt
These reports with regard to DEBUGASSERT have been reported before. DEBUGASSERT is defined in a ccouple of ways.  Here is one way: do  \     { \   if (predict_false(!(f)))    \     __assert(__A

Using static analysis to find (potential) bugs

2023-10-10 Thread Daniel Appiagyei
Hey, I was running the [cppcheck](https://cppcheck.sourceforge.io/) static analysis tool, found a few potential bugs, and wrote the following to share how tools like this can help us ensure the integrity of our code. The following are some bugs found. If anyone is interested in running cppcheck on