diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-03-11 09:51:03 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-03-11 13:41:29 -0400 |
commit | 2c3ef3a06ee1f951f6d68be6d0d3f6a1822b05b7 (patch) | |
tree | 1474b759607c47db6c7cc95986a4f9ef9956ba18 | |
parent | f9e9e5f9013cc2e9d238cbcad9a1dfaf3a529aac (diff) | |
download | bfs-2c3ef3a06ee1f951f6d68be6d0d3f6a1822b05b7.tar.xz |
Re-run include-what-you-use
-rw-r--r-- | src/alloc.h | 1 | ||||
-rw-r--r-- | src/bfstd.c | 6 | ||||
-rw-r--r-- | src/bftw.c | 1 | ||||
-rw-r--r-- | src/color.h | 1 | ||||
-rw-r--r-- | src/ctx.c | 1 | ||||
-rw-r--r-- | src/ctx.h | 2 | ||||
-rw-r--r-- | src/diag.c | 2 | ||||
-rw-r--r-- | src/dir.h | 4 | ||||
-rw-r--r-- | src/dstring.c | 2 | ||||
-rw-r--r-- | src/eval.c | 4 | ||||
-rw-r--r-- | src/expr.c | 4 | ||||
-rw-r--r-- | src/expr.h | 1 | ||||
-rw-r--r-- | src/ioq.c | 5 | ||||
-rw-r--r-- | src/main.c | 1 | ||||
-rw-r--r-- | src/opt.c | 3 | ||||
-rw-r--r-- | src/parse.c | 3 | ||||
-rw-r--r-- | src/printf.c | 3 | ||||
-rw-r--r-- | src/trie.c | 2 | ||||
-rw-r--r-- | src/trie.h | 1 | ||||
-rw-r--r-- | src/xspawn.c | 1 | ||||
-rw-r--r-- | src/xtime.c | 1 | ||||
-rw-r--r-- | tests/alloc.c | 1 | ||||
-rw-r--r-- | tests/bfstd.c | 3 | ||||
-rw-r--r-- | tests/bit.c | 2 | ||||
-rw-r--r-- | tests/ioq.c | 2 | ||||
-rw-r--r-- | tests/main.c | 3 | ||||
-rw-r--r-- | tests/xtime.c | 4 | ||||
-rw-r--r-- | tests/xtouch.c | 1 |
28 files changed, 33 insertions, 32 deletions
diff --git a/src/alloc.h b/src/alloc.h index 60dd738..ae055bc 100644 --- a/src/alloc.h +++ b/src/alloc.h @@ -10,6 +10,7 @@ #include "config.h" #include <errno.h> +#include <stddef.h> #include <stdlib.h> /** Check if a size is properly aligned. */ diff --git a/src/bfstd.c b/src/bfstd.c index ce4aa49..c6c2e7f 100644 --- a/src/bfstd.c +++ b/src/bfstd.c @@ -2,18 +2,19 @@ // SPDX-License-Identifier: 0BSD #include "bfstd.h" -#include "bit.h" #include "config.h" #include "diag.h" #include "sanity.h" #include "thread.h" #include "xregex.h" -#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <langinfo.h> +#include <limits.h> #include <locale.h> #include <nl_types.h> +#include <pthread.h> +#include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -24,7 +25,6 @@ #include <sys/wait.h> #include <unistd.h> #include <wchar.h> -#include <wctype.h> #if BFS_USE_SYS_SYSMACROS_H # include <sys/sysmacros.h> @@ -35,6 +35,7 @@ #include <stdlib.h> #include <string.h> #include <sys/stat.h> +#include <sys/types.h> /** Initialize a bftw_stat cache. */ static void bftw_stat_init(struct bftw_stat *bufs, struct bfs_stat *stat_buf, struct bfs_stat *lstat_buf) { diff --git a/src/color.h b/src/color.h index 85633a4..e3e7973 100644 --- a/src/color.h +++ b/src/color.h @@ -10,7 +10,6 @@ #include "config.h" #include "dstring.h" -#include <stdarg.h> #include <stdio.h> /** @@ -6,6 +6,7 @@ #include "color.h" #include "diag.h" #include "expr.h" +#include "list.h" #include "mtab.h" #include "pwcache.h" #include "stat.h" @@ -18,6 +18,8 @@ #include <sys/resource.h> #include <time.h> +struct CFILE; + /** * The execution context for bfs. */ @@ -11,8 +11,8 @@ #include "expr.h" #include <errno.h> #include <stdarg.h> +#include <stdio.h> #include <stdlib.h> -#include <string.h> /** bfs_diagf() implementation. */ attr(printf(2, 0)) @@ -8,8 +8,6 @@ #ifndef BFS_DIR_H #define BFS_DIR_H -#include "alloc.h" -#include "config.h" #include <sys/types.h> /** @@ -78,6 +76,8 @@ struct bfs_dirent { */ struct bfs_dir *bfs_allocdir(void); +struct arena; + /** * Initialize an arena for directories. * diff --git a/src/dstring.c b/src/dstring.c index bc18308..10b0fad 100644 --- a/src/dstring.c +++ b/src/dstring.c @@ -7,6 +7,8 @@ #include "config.h" #include "diag.h" #include <stdarg.h> +#include <stddef.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -25,7 +25,6 @@ #include "stat.h" #include "trie.h" #include "xregex.h" -#include "xtime.h" #include <errno.h> #include <fcntl.h> #include <fnmatch.h> @@ -36,8 +35,9 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <sys/resource.h> -#include <sys/stat.h> +#include <sys/types.h> #include <time.h> #include <unistd.h> #include <wchar.h> @@ -4,12 +4,12 @@ #include "expr.h" #include "alloc.h" #include "ctx.h" +#include "diag.h" #include "eval.h" #include "exec.h" +#include "list.h" #include "printf.h" #include "xregex.h" -#include <stdio.h> -#include <stdlib.h> #include <string.h> struct bfs_expr *bfs_expr_new(struct bfs_ctx *ctx, bfs_eval_fn *eval_fn, size_t argc, char **argv) { @@ -12,7 +12,6 @@ #include "config.h" #include "eval.h" #include "stat.h" -#include <stddef.h> #include <sys/types.h> #include <time.h> @@ -126,13 +126,14 @@ #include "config.h" #include "diag.h" #include "dir.h" -#include "sanity.h" #include "stat.h" #include "thread.h" -#include <assert.h> #include <errno.h> +#include <fcntl.h> #include <pthread.h> +#include <stdint.h> #include <stdlib.h> +#include <sys/stat.h> #if BFS_USE_LIBURING # include <liburing.h> @@ -48,6 +48,7 @@ #include "bfstd.h" #include "config.h" #include "ctx.h" +#include "diag.h" #include "eval.h" #include "parse.h" #include <errno.h> @@ -26,11 +26,13 @@ */ #include "opt.h" +#include "bftw.h" #include "bit.h" #include "color.h" #include "config.h" #include "ctx.h" #include "diag.h" +#include "dir.h" #include "eval.h" #include "exec.h" #include "expr.h" @@ -40,7 +42,6 @@ #include <limits.h> #include <stdarg.h> #include <stdio.h> -#include <string.h> #include <unistd.h> static char *fake_and_arg = "-and"; diff --git a/src/parse.c b/src/parse.c index b26a50f..3b7386d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -42,8 +42,7 @@ #include <stdlib.h> #include <string.h> #include <sys/stat.h> -#include <sys/time.h> -#include <sys/wait.h> +#include <sys/types.h> #include <time.h> #include <unistd.h> diff --git a/src/printf.c b/src/printf.c index 34ed606..487f039 100644 --- a/src/printf.c +++ b/src/printf.c @@ -2,6 +2,7 @@ // SPDX-License-Identifier: 0BSD #include "printf.h" +#include "alloc.h" #include "bfstd.h" #include "bftw.h" #include "color.h" @@ -14,10 +15,10 @@ #include "mtab.h" #include "pwcache.h" #include "stat.h" -#include "xtime.h" #include <errno.h> #include <grp.h> #include <pwd.h> +#include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -87,9 +87,7 @@ #include "config.h" #include "diag.h" #include "list.h" -#include <limits.h> #include <stdint.h> -#include <stdlib.h> #include <string.h> bfs_static_assert(CHAR_WIDTH == 8); @@ -5,7 +5,6 @@ #define BFS_TRIE_H #include "alloc.h" -#include "config.h" #include "list.h" #include <stddef.h> #include <stdint.h> diff --git a/src/xspawn.c b/src/xspawn.c index 8d6108b..6a94d3d 100644 --- a/src/xspawn.c +++ b/src/xspawn.c @@ -12,7 +12,6 @@ #include <string.h> #include <sys/resource.h> #include <sys/types.h> -#include <sys/wait.h> #include <unistd.h> #if BFS_USE_PATHS_H diff --git a/src/xtime.c b/src/xtime.c index 05f0e1a..5b259ab 100644 --- a/src/xtime.c +++ b/src/xtime.c @@ -7,7 +7,6 @@ #include "diag.h" #include <errno.h> #include <limits.h> -#include <stdlib.h> #include <sys/time.h> #include <time.h> #include <unistd.h> diff --git a/tests/alloc.c b/tests/alloc.c index 4ce23d4..9f08111 100644 --- a/tests/alloc.c +++ b/tests/alloc.c @@ -3,6 +3,7 @@ #include "tests.h" #include "../src/alloc.h" +#include "../src/config.h" #include "../src/diag.h" #include <errno.h> #include <stdlib.h> diff --git a/tests/bfstd.c b/tests/bfstd.c index 0ded5de..26abdb6 100644 --- a/tests/bfstd.c +++ b/tests/bfstd.c @@ -7,9 +7,6 @@ #include "../src/diag.h" #include <errno.h> #include <langinfo.h> -#include <locale.h> -#include <stdint.h> -#include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/tests/bit.c b/tests/bit.c index b944748..3d66ce3 100644 --- a/tests/bit.c +++ b/tests/bit.c @@ -3,10 +3,10 @@ #include "tests.h" #include "../src/bit.h" +#include "../src/config.h" #include "../src/diag.h" #include <limits.h> #include <stdint.h> -#include <stdlib.h> bfs_static_assert(UMAX_WIDTH(0x1) == 1); bfs_static_assert(UMAX_WIDTH(0x3) == 2); diff --git a/tests/ioq.c b/tests/ioq.c index 56e1886..1ce8f75 100644 --- a/tests/ioq.c +++ b/tests/ioq.c @@ -4,10 +4,12 @@ #include "tests.h" #include "../src/ioq.h" #include "../src/bfstd.h" +#include "../src/config.h" #include "../src/diag.h" #include "../src/dir.h" #include <errno.h> #include <fcntl.h> +#include <stdlib.h> /** * Test for blocking within ioq_slot_push(). diff --git a/tests/main.c b/tests/main.c index 38438b2..8849e8c 100644 --- a/tests/main.c +++ b/tests/main.c @@ -6,11 +6,8 @@ */ #include "tests.h" -#include "../src/bfstd.h" #include "../src/color.h" #include "../src/config.h" -#include "../src/diag.h" -#include <errno.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> diff --git a/tests/xtime.c b/tests/xtime.c index 3f1fec2..c8dc00b 100644 --- a/tests/xtime.c +++ b/tests/xtime.c @@ -5,10 +5,10 @@ #include "../src/xtime.h" #include "../src/bfstd.h" #include "../src/config.h" +#include "../src/diag.h" #include <errno.h> +#include <limits.h> #include <stdint.h> -#include <stdio.h> -#include <stdlib.h> #include <time.h> static bool tm_equal(const struct tm *tma, const struct tm *tmb) { diff --git a/tests/xtouch.c b/tests/xtouch.c index 8c5c5f3..fad272f 100644 --- a/tests/xtouch.c +++ b/tests/xtouch.c @@ -11,6 +11,7 @@ #include <stdlib.h> #include <string.h> #include <sys/stat.h> +#include <sys/types.h> #include <time.h> #include <unistd.h> |