Aug. 11, 2021
8:47 a.m.
On Wednesday 2021-08-11 01:11, Paul Eggert wrote:
With these patches you should be able to run clang this way:
clang --analyze -Xanalyzer -analyzer-output=text localtime.c \ -DALL_STATE -DHAVE_MALLOC_ERRNO=0
and get a clean report.
Certainly not.
Did you actually try it? It worked for me. I am using clang 12.0.0 (Fedora 12.0.0-2.fc34) on x86-64. The key is that -DHAVE_MALLOC_ERRNO=0 option.
But I have a platform where malloc does set errno on failure, hence I am looking (only) at the -DHAVE_MALLOC_ERRNO=1 configuration and what clang outputs there.