[xsd-users] Regarding bugs - Type Mismatch: Signed to Unsigned

Boris Kolpackov boris at codesynthesis.com
Mon Nov 7 06:59:20 EST 2022


Muralidhara B K <muralidhara.bk at microfocus.com> writes:

> Its better to add a NULL check prior to dereferencing pointer [...]

No, it is better to understand why your static analysis tool thinks
that this pointer could be NULL. If you look at the code, the function
compiles a regex closure, and a closure would normally contain at least
one child. So, in a sense, the "not NULL" check should be implied by
the call site.


> Please check if adding NULL check is feasible.

No, adding checks just to satisfy static analysis tools (which are
well-know to have false-positives) is not feasible. If we go down
this route, then every place where we dereference a pointer will need
a check like that.



More information about the xsd-users mailing list