diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2015-02-14 09:44:31 +0100 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2015-02-23 23:53:42 +0100 |
commit | 2eec67acbb00593e414549a7e5b35eb7dd776b1b (patch) | |
tree | c692391dddfa88d938a29ea238a9e1a95da879fc /src/test | |
parent | 4aab5d0cbd979b2cccb88534f118bceaa86466d8 (diff) |
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.
Diffstat (limited to 'src/test')
33 files changed, 0 insertions, 75 deletions
diff --git a/src/test/test-barrier.c b/src/test/test-barrier.c index cb75f7314d..2d109a30e7 100644 --- a/src/test/test-barrier.c +++ b/src/test/test-barrier.c @@ -28,15 +28,12 @@ * increase it at the slightly cost of lengthen test-duration on other machines. */ -#include <errno.h> #include <stdio.h> -#include <string.h> #include <sys/time.h> #include <sys/wait.h> #include <unistd.h> #include "barrier.h" -#include "def.h" #include "util.h" /* 20ms to test deadlocks; All timings use multiples of this constant as diff --git a/src/test/test-btrfs.c b/src/test/test-btrfs.c index 150a32ad6f..c49b832179 100644 --- a/src/test/test-btrfs.c +++ b/src/test/test-btrfs.c @@ -19,7 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <stdlib.h> #include <fcntl.h> #include "log.h" diff --git a/src/test/test-cap-list.c b/src/test/test-cap-list.c index 632d62ff8f..43a2d35b80 100644 --- a/src/test/test-cap-list.c +++ b/src/test/test-cap-list.c @@ -20,7 +20,6 @@ ***/ #include "util.h" -#include "log.h" #include "fileio.h" #include "cap-list.h" #include "capability.h" diff --git a/src/test/test-capability.c b/src/test/test-capability.c index 43769923b0..f47452ce72 100644 --- a/src/test/test-capability.c +++ b/src/test/test-capability.c @@ -17,7 +17,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <sys/types.h> #include <sys/wait.h> #include <sys/capability.h> #include <sys/socket.h> diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c index 9e9de23e0e..d14a07e1f4 100644 --- a/src/test/test-cgroup-mask.c +++ b/src/test/test-cgroup-mask.c @@ -20,14 +20,9 @@ ***/ #include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <pwd.h> #include "manager.h" #include "unit.h" -#include "util.h" #include "macro.h" #include "test-helper.h" diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index 67eeeb56b7..9834a6a130 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -19,7 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <assert.h> #include "util.h" #include "cgroup-util.h" diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c index 46642f92fe..4be69a408d 100644 --- a/src/test/test-cgroup.c +++ b/src/test/test-cgroup.c @@ -25,7 +25,6 @@ #include "cgroup-util.h" #include "path-util.h" #include "util.h" -#include "log.h" int main(int argc, char*argv[]) { char *path; diff --git a/src/test/test-ellipsize.c b/src/test/test-ellipsize.c index f97c78ebd6..6a2f9aa943 100644 --- a/src/test/test-ellipsize.c +++ b/src/test/test-ellipsize.c @@ -22,7 +22,6 @@ #include <stdio.h> #include "util.h" -#include "utf8.h" #include "def.h" static void test_one(const char *p) { diff --git a/src/test/test-engine.c b/src/test/test-engine.c index 456999ca40..c8d0a147a7 100644 --- a/src/test/test-engine.c +++ b/src/test/test-engine.c @@ -22,7 +22,6 @@ #include <stdio.h> #include <errno.h> #include <string.h> -#include <unistd.h> #include "manager.h" #include "bus-util.h" diff --git a/src/test/test-env-replace.c b/src/test/test-env-replace.c index 0274e97618..8f1fcd992c 100644 --- a/src/test/test-env-replace.c +++ b/src/test/test-env-replace.c @@ -19,7 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <unistd.h> #include <string.h> #include "util.h" diff --git a/src/test/test-execute.c b/src/test/test-execute.c index 91ccaf72b8..428fd32600 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -23,7 +23,6 @@ #include "manager.h" #include "util.h" #include "macro.h" -#include "strv.h" #include "mkdir.h" typedef void (*test_function_t)(Manager *m); diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c index 6900da9e89..40be084ffb 100644 --- a/src/test/test-hashmap.c +++ b/src/test/test-hashmap.c @@ -17,8 +17,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <inttypes.h> -#include "strv.h" #include "util.h" #include "hashmap.h" diff --git a/src/test/test-hostname.c b/src/test/test-hostname.c index 86efa1a3f7..c7e5de896b 100644 --- a/src/test/test-hostname.c +++ b/src/test/test-hostname.c @@ -19,10 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <errno.h> -#include <string.h> -#include <stdio.h> -#include <fcntl.h> #include "hostname-setup.h" #include "util.h" diff --git a/src/test/test-install.c b/src/test/test-install.c index 467970b007..5ee52e64cb 100644 --- a/src/test/test-install.c +++ b/src/test/test-install.c @@ -19,13 +19,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <errno.h> #include <string.h> #include <stdio.h> -#include <fcntl.h> -#include "util.h" -#include "path-util.h" #include "install.h" static void dump_changes(UnitFileChange *c, unsigned n) { diff --git a/src/test/test-job-type.c b/src/test/test-job-type.c index 1d9d49b228..af0d76e894 100644 --- a/src/test/test-job-type.c +++ b/src/test/test-job-type.c @@ -20,9 +20,6 @@ ***/ #include <stdio.h> -#include <errno.h> -#include <string.h> -#include <unistd.h> #include "job.h" #include "unit.h" diff --git a/src/test/test-json.c b/src/test/test-json.c index b09131891c..24dc7003bc 100644 --- a/src/test/test-json.c +++ b/src/test/test-json.c @@ -21,7 +21,6 @@ #include <math.h> -#include "log.h" #include "util.h" #include "json.h" diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c index 293c151d42..2b004fdfb1 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -19,13 +19,8 @@ ***/ #include <stdio.h> -#include <stdarg.h> -#include <stdlib.h> #include <unistd.h> -#include <errno.h> -#include <string.h> #include <getopt.h> -#include <fcntl.h> #include <sys/epoll.h> #include "libudev.h" diff --git a/src/test/test-locale-util.c b/src/test/test-locale-util.c index 1398a3a0b9..9765075365 100644 --- a/src/test/test-locale-util.c +++ b/src/test/test-locale-util.c @@ -17,7 +17,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <unistd.h> #include "locale-util.h" #include "strv.h" diff --git a/src/test/test-loopback.c b/src/test/test-loopback.c index 75fe053b63..c03bda4382 100644 --- a/src/test/test-loopback.c +++ b/src/test/test-loopback.c @@ -19,14 +19,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <errno.h> #include <string.h> #include <stdio.h> -#include <fcntl.h> #include "loopback-setup.h" #include "log.h" -#include "util.h" int main(int argc, char* argv[]) { int r; diff --git a/src/test/test-ns.c b/src/test/test-ns.c index 7cd7b77153..76b131c284 100644 --- a/src/test/test-ns.c +++ b/src/test/test-ns.c @@ -20,13 +20,9 @@ ***/ #include <stdlib.h> -#include <string.h> #include <unistd.h> -#include <sys/mount.h> -#include <linux/fs.h> #include "namespace.h" -#include "execute.h" #include "log.h" int main(int argc, char *argv[]) { diff --git a/src/test/test-path-lookup.c b/src/test/test-path-lookup.c index 38e5c93df6..a951b01b97 100644 --- a/src/test/test-path-lookup.c +++ b/src/test/test-path-lookup.c @@ -20,7 +20,6 @@ ***/ #include <sys/stat.h> -#include <sys/types.h> #include "path-lookup.h" #include "log.h" diff --git a/src/test/test-pty.c b/src/test/test-pty.c index cab569a9da..eadecb99a0 100644 --- a/src/test/test-pty.c +++ b/src/test/test-pty.c @@ -20,13 +20,11 @@ ***/ #include <errno.h> -#include <fcntl.h> #include <locale.h> #include <string.h> #include <sys/wait.h> #include <unistd.h> -#include "def.h" #include "pty.h" #include "util.h" diff --git a/src/test/test-ring.c b/src/test/test-ring.c index a9dd01ca01..cb8a5d4e9e 100644 --- a/src/test/test-ring.c +++ b/src/test/test-ring.c @@ -20,14 +20,9 @@ ***/ #include <string.h> -#include <unistd.h> -#include <fcntl.h> -#include <locale.h> -#include <errno.h> #include "def.h" #include "ring.h" -#include "util.h" static void test_ring(void) { static const char buf[8192]; diff --git a/src/test/test-rtnl-manual.c b/src/test/test-rtnl-manual.c index c8133dbad7..c406454f77 100644 --- a/src/test/test-rtnl-manual.c +++ b/src/test/test-rtnl-manual.c @@ -19,7 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <netinet/ether.h> #include <arpa/inet.h> #include <net/if.h> #include <linux/ip.h> @@ -29,10 +28,6 @@ #include "util.h" #include "macro.h" #include "sd-rtnl.h" -#include "socket-util.h" -#include "rtnl-util.h" -#include "event-util.h" -#include "rtnl-internal.h" static int load_module(const char *mod_name) { struct kmod_ctx *ctx; diff --git a/src/test/test-set.c b/src/test/test-set.c index e280c8952d..ac292ed680 100644 --- a/src/test/test-set.c +++ b/src/test/test-set.c @@ -17,7 +17,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "util.h" #include "set.h" static void test_set_steal_first(void) { diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c index a1020ad14c..1d75d05a88 100644 --- a/src/test/test-sleep.c +++ b/src/test/test-sleep.c @@ -19,10 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <errno.h> -#include <string.h> #include <stdio.h> -#include <fcntl.h> #include "util.h" #include "log.h" diff --git a/src/test/test-strxcpyx.c b/src/test/test-strxcpyx.c index a7c8e1267d..858a4081da 100644 --- a/src/test/test-strxcpyx.c +++ b/src/test/test-strxcpyx.c @@ -22,7 +22,6 @@ #include <string.h> #include "util.h" -#include "strv.h" #include "strxcpyx.h" static void test_strpcpy(void) { diff --git a/src/test/test-tables.c b/src/test/test-tables.c index bda224bec6..0e5ab1645f 100644 --- a/src/test/test-tables.c +++ b/src/test/test-tables.c @@ -23,14 +23,12 @@ #include "condition.h" #include "device.h" #include "execute.h" -#include "exit-status.h" #include "install.h" #include "job.h" #include "kill.h" #include "log.h" #include "logs-show.h" #include "mount.h" -#include "path-lookup.h" #include "path.h" #include "scope.h" #include "service.h" diff --git a/src/test/test-tmpfiles.c b/src/test/test-tmpfiles.c index 4b72c4a8fa..90e49d4542 100644 --- a/src/test/test-tmpfiles.c +++ b/src/test/test-tmpfiles.c @@ -19,8 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <sys/types.h> -#include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> diff --git a/src/test/test-udev.c b/src/test/test-udev.c index b57d275efa..4403624c5a 100644 --- a/src/test/test-udev.c +++ b/src/test/test-udev.c @@ -19,14 +19,9 @@ ***/ #include <stdio.h> -#include <stddef.h> #include <stdlib.h> -#include <string.h> -#include <fcntl.h> -#include <ctype.h> #include <errno.h> #include <unistd.h> -#include <grp.h> #include <sched.h> #include <sys/mount.h> #include <sys/signalfd.h> diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index e517f571d6..22ac76de56 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -20,7 +20,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <assert.h> #include <stdio.h> #include <stddef.h> #include <string.h> diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 5c7f8b40f7..7d882aebd6 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -24,14 +24,12 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/types.h> #include <pwd.h> #include "manager.h" #include "unit.h" #include "unit-name.h" #include "unit-printf.h" -#include "install.h" #include "specifier.h" #include "util.h" #include "macro.h" diff --git a/src/test/test-watchdog.c b/src/test/test-watchdog.c index f6bb045c3c..2e5d0c3aae 100644 --- a/src/test/test-watchdog.c +++ b/src/test/test-watchdog.c @@ -20,7 +20,6 @@ ***/ #include <unistd.h> -#include <string.h> #include "watchdog.h" #include "log.h" |