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.
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-02-23 23:53:42 +01:00
parent 4aab5d0cbd
commit 2eec67acbb
479 changed files with 11 additions and 1286 deletions
-3
View File
@@ -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
-1
View File
@@ -19,7 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdlib.h>
#include <fcntl.h>
#include "log.h"
-1
View File
@@ -20,7 +20,6 @@
***/
#include "util.h"
#include "log.h"
#include "fileio.h"
#include "cap-list.h"
#include "capability.h"
-1
View File
@@ -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>
-5
View File
@@ -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"
-1
View File
@@ -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"
-1
View File
@@ -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;
-1
View File
@@ -22,7 +22,6 @@
#include <stdio.h>
#include "util.h"
#include "utf8.h"
#include "def.h"
static void test_one(const char *p) {
-1
View File
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include "manager.h"
#include "bus-util.h"
-1
View File
@@ -19,7 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <unistd.h>
#include <string.h>
#include "util.h"
-1
View File
@@ -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);
-2
View File
@@ -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"
-4
View File
@@ -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"
-4
View File
@@ -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) {
-3
View File
@@ -20,9 +20,6 @@
***/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include "job.h"
#include "unit.h"
-1
View File
@@ -21,7 +21,6 @@
#include <math.h>
#include "log.h"
#include "util.h"
#include "json.h"
-5
View File
@@ -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"
-1
View File
@@ -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"
-3
View File
@@ -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;
-4
View File
@@ -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[]) {
-1
View File
@@ -20,7 +20,6 @@
***/
#include <sys/stat.h>
#include <sys/types.h>
#include "path-lookup.h"
#include "log.h"
-2
View File
@@ -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"
-5
View File
@@ -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];
-5
View File
@@ -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;
-1
View File
@@ -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) {
-3
View File
@@ -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"
-1
View File
@@ -22,7 +22,6 @@
#include <string.h>
#include "util.h"
#include "strv.h"
#include "strxcpyx.h"
static void test_strpcpy(void) {
-2
View File
@@ -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"
-2
View File
@@ -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>
-5
View File
@@ -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>
-1
View File
@@ -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>
-2
View File
@@ -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"
-1
View File
@@ -20,7 +20,6 @@
***/
#include <unistd.h>
#include <string.h>
#include "watchdog.h"
#include "log.h"