Found with the 'include-what-you-use' tool.
---
decl.c | 2 --
eval.c | 1 -
expr.c | 1 -
pp.c | 1 -
scan.c | 1 -
stmt.c | 3 ---
targ.c | 1 -
token.c | 1 -
utf.h | 3 +++
util.c | 1 -
util.h | 3 +++
11 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/decl.c b/decl.c
index 228c776..415d12f 100644
--- a/decl.c
+++ b/decl.c
@@ -2,8 +2,6 @@
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#include "util.h"
#include "cc.h"
diff --git a/eval.c b/eval.c
index 98f5ec9..921999a 100644
--- a/eval.c
+++ b/eval.c
@@ -1,5 +1,4 @@
#include <limits.h>
-#include <stdbool.h>
#include <stddef.h>
#include "util.h"
#include "cc.h"
diff --git a/expr.c b/expr.c
index aef6fe9..d2e05b7 100644
--- a/expr.c
+++ b/expr.c
@@ -1,6 +1,5 @@
#include <assert.h>
#include <ctype.h>
-#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
diff --git a/pp.c b/pp.c
index 99e56e8..f833d78 100644
--- a/pp.c
+++ b/pp.c
@@ -1,5 +1,4 @@
#include <assert.h>
-#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/scan.c b/scan.c
index 8a38e22..1c2d503 100644
--- a/scan.c
+++ b/scan.c
@@ -1,5 +1,4 @@
#include <ctype.h>
-#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/stmt.c b/stmt.c
index ff163bf..ff77326 100644
--- a/stmt.c
+++ b/stmt.c
@@ -1,8 +1,5 @@
-#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include "util.h"
#include "cc.h"
diff --git a/targ.c b/targ.c
index b52c876..3b29bbd 100644
--- a/targ.c
+++ b/targ.c
@@ -1,4 +1,3 @@
-#include <stdbool.h>
#include <string.h>
#include "util.h"
#include "cc.h"
diff --git a/token.c b/token.c
index b67baa6..57ed1d1 100644
--- a/token.c
+++ b/token.c
@@ -1,4 +1,3 @@
-#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <stdbool.h>
diff --git a/utf.h b/utf.h
index bbaeaf7..5ad3428 100644
--- a/utf.h
+++ b/utf.h
@@ -1,3 +1,6 @@
+#include <stddef.h>
+#include <stdint.h>
+
size_t utf8enc(unsigned char *, uint_least32_t);
size_t utf8dec(uint_least32_t *, const unsigned char *, size_t);
size_t utf16enc(uint_least16_t *, uint_least32_t);
diff --git a/util.c b/util.c
index 598f4ca..950e3bd 100644
--- a/util.c
+++ b/util.c
@@ -1,7 +1,6 @@
#include <assert.h>
#include <errno.h>
#include <stdarg.h>
-#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/util.h b/util.h
index 56e3617..3bbb39c 100644
--- a/util.h
+++ b/util.h
@@ -1,3 +1,6 @@
+#include <stdbool.h>
+#include <stddef.h>
+
struct list {
struct list *prev, *next;
};
--
2.45.1