Re: Using static analysis to find (potential) bugs

2023-10-11 Thread Daniel Appiagyei
> if CONFIG_DEBUG_ASSERTIONS then __assert() is called. __assert() is a no-return function. In that case, it is impossible to reach the code that uses the pointer. The usages of the pointers occur before DEBUGASSERT() is called: Bug 1-3

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