Building xmlstar-1.6.1 on OS X 10.13:
src/xml_ls.c:149:15: warning: comparison of array 'd->d_name' equal to a null pointer is always false [-Wtautological-pointer-compare]
if ((d->d_name == NULL) || !strcmp(d->d_name, ".") || !strcmp(d->d_name, ".."))
~~~^~~~~~ ~~~~
The dirent.d_name member is a fixed-length char array, not a pointer to a separately allocated array. Given d itself wasn't null, d->d_name would be some valid string. But if you want to be sure (or at least short-circuit having to do strcmp when the string that exists is null), you could instead check d_namlen, as in the attached patch.
Thanks!
Unfortunately, that's not portable:
So I just removed the check instead.