-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Labels
Description
#include <sys/time.h>
void f()
{
struct timeval tv;
tv.tv_sec = 1;
tv.tv_usec = 0;
(void)tv;
}
<source>:1:1: warning: included header time.h is not used directly [misc-include-cleaner]
1 | #include <sys/time.h>
| ^~~~~~~~~~~~~~~~~~~~~
2 |
<source>:5:12: warning: no header providing "timeval" is directly included [misc-include-cleaner]
1 | #include <sys/time.h>
2 |
3 | void f()
4 | {
5 | struct timeval tv;
| ^
2 warnings generated.
clang-include-cleaner-17 --print=changes
reports:
- <sys/time.h> @Line:1
+ <bits/types/struct_timeval.h>
See
https://pubs.opengroup.org/onlinepubs/7908799/xsh/systime.h.html
https://man7.org/linux/man-pages/man2/settimeofday.2.html