On Thu, Jul 17, 2025 at 10:01:42AM +0200, Antonio Quartulli wrote: > > I agree a comment would help. > > > Another option would be to initialize the be_prev to NULL. This will > > silence the uninitialized variable warning. > > But will likely trigger a potential NULL-ptr-deref, because the static > analyzer believes we can get there with count==0. > I don't know how Coverity does this. In my experience, writing Smatch I had to treat initializations to NULL as "ignore this variable". We used to have an uninitialized_var() macro to silence uninitialized variables. It did an assignment to itself something like: #define uninitialized_var(x) x = x But we removed it and changed all those places to just initialize the variables to zero. Even before, initializing things to zero was the standard way to silence GCC uninitialized variable warnings, so warning about NULL pointer dereferences tended to be prone to false positives and the worst kind of really complicated false positives too. regards, dan carpenter