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:
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
* Our default bloom filter has the following parameters:
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "bus-error.h"
|
||||
|
||||
#define BUS_ERROR_NO_SUCH_UNIT "org.freedesktop.systemd1.NoSuchUnit"
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "fileio.h"
|
||||
#include "bus-internal.h"
|
||||
#include "bus-socket.h"
|
||||
#include "bus-container.h"
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "bus-bloom.h"
|
||||
#include "bus-util.h"
|
||||
#include "capability.h"
|
||||
#include "cgroup-util.h"
|
||||
|
||||
_public_ int sd_bus_get_unique_name(sd_bus *bus, const char **unique) {
|
||||
int r;
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "audit.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-util.h"
|
||||
#include "time-util.h"
|
||||
#include "strv.h"
|
||||
#include "bus-creds.h"
|
||||
#include "bus-label.h"
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "time-util.h"
|
||||
|
||||
struct sd_bus_creds {
|
||||
bool allocated;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "util.h"
|
||||
#include "capability.h"
|
||||
#include "strv.h"
|
||||
#include "audit.h"
|
||||
#include "macro.h"
|
||||
#include "cap-list.h"
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include "util.h"
|
||||
#include "bus-type.h"
|
||||
#include "bus-gvariant.h"
|
||||
#include "bus-signature.h"
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
***/
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <netinet/in.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "hashmap.h"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
***/
|
||||
|
||||
#include "util.h"
|
||||
#include "sd-bus-protocol.h"
|
||||
#include "bus-introspect.h"
|
||||
#include "bus-signature.h"
|
||||
#include "bus-internal.h"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "strv.h"
|
||||
#include "memfd-util.h"
|
||||
#include "capability.h"
|
||||
#include "cgroup-util.h"
|
||||
#include "fileio.h"
|
||||
|
||||
#include "bus-internal.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "bus-internal.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-match.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
#include "strv.h"
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "utf8.h"
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
#include "cgroup-util.h"
|
||||
#include "memfd-util.h"
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
@@ -23,11 +23,9 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <byteswap.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "sd-bus.h"
|
||||
#include "kdbus.h"
|
||||
#include "time-util.h"
|
||||
#include "bus-creds.h"
|
||||
#include "bus-protocol.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
bool signature_is_single(const char *s, bool allow_dict_entry);
|
||||
bool signature_is_pair(const char *s);
|
||||
|
||||
@@ -20,16 +20,13 @@
|
||||
***/
|
||||
|
||||
#include <endian.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
#include <byteswap.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
#include "strv.h"
|
||||
#include "utf8.h"
|
||||
#include "sd-daemon.h"
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
***/
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "set.h"
|
||||
#include "bus-util.h"
|
||||
#include "bus-internal.h"
|
||||
#include "bus-track.h"
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include "util.h"
|
||||
#include "bus-type.h"
|
||||
|
||||
bool bus_type_is_valid(char c) {
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "macro.h"
|
||||
#include "sd-bus.h"
|
||||
#include "sd-bus-protocol.h"
|
||||
|
||||
bool bus_type_is_valid(char c) _const_;
|
||||
bool bus_type_is_valid_in_signature(char c) _const_;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "sd-bus.h"
|
||||
#include "hashmap.h"
|
||||
#include "time-util.h"
|
||||
#include "util.h"
|
||||
|
||||
typedef enum BusTransport {
|
||||
BUS_TRANSPORT_LOCAL,
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct XMLIntrospectOps {
|
||||
|
||||
@@ -26,12 +26,10 @@
|
||||
#include "log.h"
|
||||
#include "build.h"
|
||||
#include "pager.h"
|
||||
#include "xml.h"
|
||||
#include "path-util.h"
|
||||
#include "set.h"
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-internal.h"
|
||||
#include "bus-util.h"
|
||||
#include "bus-dump.h"
|
||||
|
||||
@@ -20,19 +20,16 @@
|
||||
***/
|
||||
|
||||
#include <endian.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#include <poll.h>
|
||||
#include <byteswap.h>
|
||||
#include <sys/mman.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "macro.h"
|
||||
#include "strv.h"
|
||||
#include "set.h"
|
||||
#include "missing.h"
|
||||
#include "def.h"
|
||||
#include "cgroup-util.h"
|
||||
@@ -45,8 +42,6 @@
|
||||
#include "bus-socket.h"
|
||||
#include "bus-kernel.h"
|
||||
#include "bus-control.h"
|
||||
#include "bus-introspect.h"
|
||||
#include "bus-signature.h"
|
||||
#include "bus-objects.h"
|
||||
#include "bus-util.h"
|
||||
#include "bus-container.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "macro.h"
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-match.h"
|
||||
#include "bus-internal.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "sd-bus.h"
|
||||
#include "bus-dump.h"
|
||||
#include "bus-util.h"
|
||||
#include "util.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
_cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
#include "bus-introspect.h"
|
||||
|
||||
|
||||
@@ -19,16 +19,12 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
#include "time-util.h"
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-kernel.h"
|
||||
#include "bus-internal.h"
|
||||
#include "bus-util.h"
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#include "log.h"
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-kernel.h"
|
||||
#include "bus-util.h"
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include "log.h"
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-kernel.h"
|
||||
#include "bus-util.h"
|
||||
#include "bus-dump.h"
|
||||
|
||||
@@ -19,9 +19,7 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <byteswap.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef HAVE_GLIB
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
***/
|
||||
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
#include "macro.h"
|
||||
|
||||
#include "bus-match.h"
|
||||
|
||||
@@ -19,11 +19,8 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
||||
@@ -19,11 +19,8 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
@@ -31,7 +28,6 @@
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "bus-internal.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-util.h"
|
||||
|
||||
struct context {
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "log.h"
|
||||
#include "bus-signature.h"
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "util.h"
|
||||
@@ -28,7 +27,6 @@
|
||||
|
||||
#include "sd-bus.h"
|
||||
#include "bus-message.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-kernel.h"
|
||||
#include "bus-dump.h"
|
||||
|
||||
|
||||
@@ -19,11 +19,9 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/timerfd.h>
|
||||
#include <sys/wait.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
#include "sd-daemon.h"
|
||||
|
||||
@@ -23,10 +23,8 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include <fnmatch.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "sd-hwdb.h"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include "util.h"
|
||||
#include "sd-network.h"
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_network_monitor*, sd_network_monitor_unref);
|
||||
|
||||
@@ -20,19 +20,16 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/inotify.h>
|
||||
#include <poll.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "macro.h"
|
||||
#include "strv.h"
|
||||
#include "fileio.h"
|
||||
#include "sd-network.h"
|
||||
#include "network-internal.h"
|
||||
|
||||
_public_ int sd_network_get_operational_state(char **state) {
|
||||
_cleanup_free_ char *s = NULL;
|
||||
|
||||
@@ -19,24 +19,13 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/select.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
@@ -21,14 +21,11 @@
|
||||
***/
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdio.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "socket-util.h"
|
||||
|
||||
@@ -21,10 +21,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "sd-rtnl.h"
|
||||
#include "in-addr-util.h"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
***/
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ether.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
@@ -19,12 +19,10 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/socket.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/in6.h>
|
||||
#include <linux/veth.h>
|
||||
#include <linux/if_bridge.h>
|
||||
#include <linux/if_addr.h>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <netinet/ether.h>
|
||||
|
||||
#include "sd-rtnl.h"
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <netinet/ether.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "sd-rtnl.h"
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "rtnl-util.h"
|
||||
#include "event-util.h"
|
||||
#include "missing.h"
|
||||
#include "rtnl-internal.h"
|
||||
|
||||
static void test_message_link_bridge(sd_rtnl *rtnl) {
|
||||
_cleanup_rtnl_message_unref_ sd_rtnl_message *message = NULL;
|
||||
|
||||
Reference in New Issue
Block a user