From 0c4a2087c6ae734405649793327f371771f990db Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 14 Jul 2011 18:44:46 +0100 Subject: [PATCH] Remove various never-used variables Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231 Reviewed-by: Will Thompson --- bus/activation.c | 3 --- bus/bus.c | 8 -------- bus/dispatch.c | 1 - bus/main.c | 2 -- dbus/dbus-internals.c | 1 - dbus/dbus-nonce.c | 2 -- dbus/dbus-server-socket.c | 2 -- dbus/dbus-sysdeps-util-unix.c | 1 - test/dbus-daemon.c | 2 -- test/marshal.c | 1 - test/name-test/test-privserver-client.c | 1 - 11 files changed, 24 deletions(-) diff --git a/bus/activation.c b/bus/activation.c index d5424a7..6101173 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -881,8 +881,6 @@ bus_activation_new (BusContext *context, DBusError *error) { BusActivation *activation; - DBusList *link; - char *dir; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -1671,7 +1669,6 @@ bus_activation_activate_service (BusActivation *activation, char **envp = NULL; int argc; dbus_bool_t retval; - DBusHashIter iter; dbus_bool_t was_pending_activation; DBusString command; diff --git a/bus/bus.c b/bus/bus.c index 04b1286..748ee90 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -481,7 +481,6 @@ process_config_every_time (BusContext *context, DBusString full_address; DBusList *link; DBusList **dirs; - BusActivation *new_activation; char *addr; const char *servicehelper; char *s; @@ -688,7 +687,6 @@ bus_context_new (const DBusString *config_file, dbus_bool_t systemd_activation, DBusError *error) { - DBusString log_prefix; BusContext *context; BusConfigParser *parser; @@ -1393,9 +1391,6 @@ bus_context_check_security_policy (BusContext *context, dbus_bool_t log; int type; dbus_bool_t requested_reply; - const char *sender_name; - const char *sender_loginfo; - const char *proposed_recipient_loginfo; type = dbus_message_get_type (message); dest = dbus_message_get_destination (message); @@ -1561,9 +1556,6 @@ bus_context_check_security_policy (BusContext *context, proposed_recipient, message, &toggles, &log)) { - const char *msg = "Rejected send message, %d matched rules; " - "type=\"%s\", sender=\"%s\" (%s) interface=\"%s\" member=\"%s\" error name=\"%s\" requested_reply=%d destination=\"%s\" (%s))"; - complain_about_message (context, DBUS_ERROR_ACCESS_DENIED, "Rejected send message", toggles, message, sender, proposed_recipient, requested_reply, diff --git a/bus/dispatch.c b/bus/dispatch.c index a80476c..dfe6f74 100644 --- a/bus/dispatch.c +++ b/bus/dispatch.c @@ -4773,7 +4773,6 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir) DBusConnection *foo, *bar; DBusError error; DBusMessage *m; - dbus_bool_t b; int one[2], two[2], x, y, z; char r; diff --git a/bus/main.c b/bus/main.c index 74b8bd2..594e3fb 100644 --- a/bus/main.c +++ b/bus/main.c @@ -288,7 +288,6 @@ main (int argc, char **argv) int i; dbus_bool_t print_address; dbus_bool_t print_pid; - dbus_bool_t is_session_bus; int force_fork; dbus_bool_t systemd_activation; @@ -306,7 +305,6 @@ main (int argc, char **argv) print_address = FALSE; print_pid = FALSE; - is_session_bus = FALSE; force_fork = FORK_FOLLOW_CONFIG_FILE; systemd_activation = FALSE; diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c index 95a491f..fcea079 100644 --- a/dbus/dbus-internals.c +++ b/dbus/dbus-internals.c @@ -347,7 +347,6 @@ _dbus_verbose_init (void) static char *_dbus_file_path_extract_elements_from_tail(const char *file,int level) { static int prefix = -1; - char *p; if (prefix == -1) { diff --git a/dbus/dbus-nonce.c b/dbus/dbus-nonce.c index d30b253..e74c2dd 100644 --- a/dbus/dbus-nonce.c +++ b/dbus/dbus-nonce.c @@ -196,7 +196,6 @@ _dbus_send_nonce (int fd, const DBusString *noncefile, DBusError *error) { dbus_bool_t read_result; int send_result; - size_t sendLen; DBusString nonce; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -240,7 +239,6 @@ do_noncefile_create (DBusNonceFile *noncefile, DBusError *error, dbus_bool_t use_subdir) { - dbus_bool_t ret; DBusString randomStr; _DBUS_ASSERT_ERROR_IS_CLEAR (error); diff --git a/dbus/dbus-server-socket.c b/dbus/dbus-server-socket.c index 02973c1..8e31da9 100644 --- a/dbus/dbus-server-socket.c +++ b/dbus/dbus-server-socket.c @@ -89,10 +89,8 @@ handle_new_client_fd_and_unlock (DBusServer *server, DBusConnection *connection; DBusTransport *transport; DBusNewConnectionFunction new_connection_function; - DBusServerSocket* socket_server; void *new_connection_data; - socket_server = (DBusServerSocket*)server; _dbus_verbose ("Creating new client connection with fd %d\n", client_fd); HAVE_LOCK_CHECK (server); diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c index a80f643..805c919 100644 --- a/dbus/dbus-sysdeps-util-unix.c +++ b/dbus/dbus-sysdeps-util-unix.c @@ -389,7 +389,6 @@ _dbus_request_file_descriptor_limit (unsigned int limit) #ifdef HAVE_SETRLIMIT struct rlimit lim; struct rlimit target_lim; - unsigned int current_limit; /* No point to doing this practically speaking * if we're not uid 0. We expect the system diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index c190cb4..eaacb87 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -150,8 +150,6 @@ echo_filter (DBusConnection *connection, void *user_data) { DBusMessage *reply; - DBusError error = DBUS_ERROR_INIT; - int *sleep_ms = user_data; if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_CALL) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; diff --git a/test/marshal.c b/test/marshal.c index 4cee941..e9ac7e3 100644 --- a/test/marshal.c +++ b/test/marshal.c @@ -146,7 +146,6 @@ test_endian (Fixture *f, gconstpointer arg) { const gchar *blob = arg; - const gchar *native_blob; char *output; DBusMessage *m; int len; diff --git a/test/name-test/test-privserver-client.c b/test/name-test/test-privserver-client.c index 1c43fae..e7f4896 100644 --- a/test/name-test/test-privserver-client.c +++ b/test/name-test/test-privserver-client.c @@ -71,7 +71,6 @@ open_shutdown_private_connection (dbus_bool_t use_guid) DBusMessage *reply; DBusConnection *privconn; char *addr; - char *comma; dbus_bool_t service_died; dbus_bool_t private_conn_lost; -- 2.7.4