Greg Stark <gsst...@mit.edu> writes:
> I think most of the remaining false positives are cases where palloc,
> palloc0, repalloc, MemoryContextAlloc, or MemoryContextAllocZero
> return values are deferenced. Clang doesn't know that these functions
> never return NULL so it's marking every case as a possible NULL
> dereference.

If clang assumes that every function that returns a pointer could return
NULL, then we are going to have many many many many false positives
at levels far removed from palloc.  I'd almost suggest that we look for
a way to reverse its default assumption about that.  Failing that,
I fear we shall simply have to ignore that particular message as
uselessly noisy.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to