Re: Issue 1040 in include-what-you-use: Include with no comment

1 view
Skip to first unread message

notifi...@include-what-you-use.org

unread,
Jul 24, 2022, 4:18:30 PMJul 24
to include-wh...@googlegroups.com
Comment #2 on issue 1040 by alejandro-colomar: Include with no comment
https://github.com/include-what-you-use/include-what-you-use/issues/1040

Just for me to be able to easily reproduce it in the future, since I changed the page and now I can't reproduce it anymore in the current page. Apply the following diff, to reproduce the bug:

```diff
diff --git a/man2/wait.2 b/man2/wait.2
index 4ed803d97..6ca50ebb5 100644
--- a/man2/wait.2
+++ b/man2/wait.2
@@ -647,11 +647,11 @@ $
\&
.\" SRC BEGIN (wait.c)
.EX
+#include <sys/wait.h>
#include <stdint.h>
-#include <stdio.h>
#include <stdlib.h>
-#include <sys/wait.h>
#include <unistd.h>
+#include <stdio.h>

int
main(int argc, char *argv[])
```


notifi...@include-what-you-use.org

unread,
Jul 24, 2022, 4:18:53 PMJul 24
to include-wh...@googlegroups.com
Then run:

```sh
make tmp/src/man2/wait.2.d/wait.lint-c.iwyu.touch
```


notifi...@include-what-you-use.org

unread,
Jul 24, 2022, 7:05:27 PMJul 24
to include-wh...@googlegroups.com
Comment #3 on issue 1040 by alejandro-colomar: Include with no comment
https://github.com/include-what-you-use/include-what-you-use/issues/1040

Oh, I get why :P Similar to another issue I reported recently

```
alx@asus5775:~/src/linux/man-pages/man-pages$ make tmp/src/man2/wait.2.d/wait.lint-c.iwyu.touch EXTRA_IWYUFLAGS='-Xiwyu --verbose=9' | grep associated
Adding /usr/include/x86_64-linux-gnu/sys/wait.h as associated header for tmp/src/man2/wait.2.d/wait.c
Marked /usr/include/x86_64-linux-gnu/sys/wait.h as associated header of tmp/src/man2/wait.2.d/wait.c.
Mapped /usr/include/x86_64-linux-gnu/sys/wait.h to <signal.h> for pid_t (in associated header)
Mapped /usr/include/x86_64-linux-gnu/sys/wait.h to <signal.h> for pid_t (in associated header)
make: *** [lib/lint-c.mk:68: tmp/src/man2/wait.2.d/wait.lint-c.iwyu.touch] Error 1
```


notifi...@include-what-you-use.org

unread,
Jul 24, 2022, 7:06:35 PMJul 24
to include-wh...@googlegroups.com
Comment #3 on issue 1040 by alejandro-colomar: Include with no comment
https://github.com/include-what-you-use/include-what-you-use/issues/1040

Oh, I get why :P

```
alx@asus5775:~/src/linux/man-pages/man-pages$ make tmp/src/man2/wait.2.d/wait.lint-c.iwyu.touch EXTRA_IWYUFLAGS='-Xiwyu --verbose=9' | grep associated
Adding /usr/include/x86_64-linux-gnu/sys/wait.h as associated header for tmp/src/man2/wait.2.d/wait.c
Marked /usr/include/x86_64-linux-gnu/sys/wait.h as associated header of tmp/src/man2/wait.2.d/wait.c.
Mapped /usr/include/x86_64-linux-gnu/sys/wait.h to <signal.h> for pid_t (in associated header)
Mapped /usr/include/x86_64-linux-gnu/sys/wait.h to <signal.h> for pid_t (in associated header)
make: *** [lib/lint-c.mk:68: tmp/src/man2/wait.2.d/wait.lint-c.iwyu.touch] Error 1
```

Similar to another issue I reported recently:
<https://github.com/include-what-you-use/include-what-you-use/issues/1037>


notifi...@include-what-you-use.org

unread,
Jul 25, 2022, 1:28:09 PMJul 25
to include-wh...@googlegroups.com
Comment #4 on issue 1040 by kimgr: Include with no comment
https://github.com/include-what-you-use/include-what-you-use/issues/1040

OK, so let's close this is a duplicate of #1037


Reply all
Reply to author
Forward
0 new messages