X Tutup
Skip to content

Commit 2eec67a

Browse files
committed
remove unused includes
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
1 parent 4aab5d0 commit 2eec67a

File tree

479 files changed

+11
-1286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

479 files changed

+11
-1286
lines changed

src/activate/activate.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
***/
2121

2222
#include <unistd.h>
23-
#include <fcntl.h>
2423
#include <sys/epoll.h>
2524
#include <sys/prctl.h>
2625
#include <sys/socket.h>

src/analyze/analyze-verify.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
***/
2121

2222
#include <stdlib.h>
23-
#include <getopt.h>
2423

2524
#include "manager.h"
2625
#include "bus-util.h"
2726
#include "log.h"
2827
#include "strv.h"
29-
#include "build.h"
3028
#include "pager.h"
3129
#include "analyze-verify.h"
3230

src/analyze/analyze.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,14 @@
2424
#include <stdlib.h>
2525
#include <getopt.h>
2626
#include <locale.h>
27-
#include <sys/utsname.h>
2827

2928
#include "sd-bus.h"
3029
#include "bus-util.h"
3130
#include "bus-error.h"
32-
#include "install.h"
3331
#include "log.h"
3432
#include "build.h"
3533
#include "util.h"
3634
#include "strxcpyx.h"
37-
#include "fileio.h"
3835
#include "strv.h"
3936
#include "unit-name.h"
4037
#include "special.h"

src/ask-password/ask-password.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,13 @@
1919
along with systemd; If not, see <http://www.gnu.org/licenses/>.
2020
***/
2121

22-
#include <sys/socket.h>
23-
#include <poll.h>
24-
#include <sys/types.h>
25-
#include <assert.h>
26-
#include <string.h>
2722
#include <errno.h>
2823
#include <unistd.h>
29-
#include <fcntl.h>
30-
#include <sys/un.h>
31-
#include <sys/stat.h>
32-
#include <sys/signalfd.h>
3324
#include <getopt.h>
34-
#include <termios.h>
35-
#include <limits.h>
3625
#include <stddef.h>
3726

3827
#include "log.h"
3928
#include "macro.h"
40-
#include "util.h"
4129
#include "strv.h"
4230
#include "ask-password-api.h"
4331
#include "def.h"

src/binfmt/binfmt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@
2525
#include <string.h>
2626
#include <stdio.h>
2727
#include <limits.h>
28-
#include <stdarg.h>
2928
#include <getopt.h>
3029

3130
#include "log.h"
32-
#include "hashmap.h"
3331
#include "strv.h"
3432
#include "util.h"
3533
#include "conf-files.h"

src/boot/bootctl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "efivars.h"
4242
#include "build.h"
4343
#include "util.h"
44-
#include "utf8.h"
4544

4645
static int verify_esp(const char *p, uint32_t *part, uint64_t *pstart, uint64_t *psize, sd_id128_t *uuid) {
4746
struct statfs sfs;

src/bootchart/bootchart.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
3434
***/
3535

36-
#include <sys/time.h>
37-
#include <sys/types.h>
3836
#include <sys/resource.h>
39-
#include <sys/stat.h>
4037
#include <stdio.h>
4138
#include <signal.h>
4239
#include <stdlib.h>

src/bootchart/bootchart.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
along with systemd; If not, see <http://www.gnu.org/licenses/>.
2525
***/
2626

27-
#include <dirent.h>
2827
#include <stdbool.h>
2928
#include "list.h"
3029

src/bootchart/store.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#include <unistd.h>
2626
#include <stdlib.h>
2727
#include <limits.h>
28-
#include <sys/types.h>
29-
#include <sys/stat.h>
3028
#include <stdio.h>
3129
#include <string.h>
3230
#include <dirent.h>

src/bootchart/svg.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@
2323
***/
2424

2525
#include <stdio.h>
26-
#include <stdarg.h>
27-
#include <stdlib.h>
2826
#include <string.h>
2927
#include <time.h>
3028
#include <limits.h>
3129
#include <unistd.h>
3230
#include <sys/utsname.h>
33-
#include <sys/stat.h>
3431
#include <fcntl.h>
3532

3633
#include "util.h"

0 commit comments

Comments
 (0)
X Tutup