In "struct dirent", the presence of the .d_type member should not be
assumed and the code should instead use DTYPE() macro, with possibly
a fallback check to determine the type of the file.
Add a rule to catch direct access to the .d_type member and use
DTYPE() macro instead, except in the emulation code paths that work
on platforms that do have the member. This is probably not sufficient
to notice the lack of necessary fallback code.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
--- /dev/null
+@@
+identifier f != { finddata2dirent, precompose_utf8_readdir };
+struct dirent *E;
+@@
+ f(...) {<...
+- E->d_type
++ DTYPE(E)
+ ...>}