summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--dbus/dbus-auth.c2
-rw-r--r--dbus/dbus-connection.c2
-rw-r--r--dbus/dbus-keyring.c4
-rw-r--r--dbus/dbus-server-debug-pipe.c2
-rw-r--r--glib/dbus-binding-tool-glib.c2
-rw-r--r--glib/dbus-glib-tool.c4
-rw-r--r--glib/dbus-gparser.c11
-rw-r--r--glib/dbus-gproxy.c2
-rw-r--r--test/glib/test-dbus-glib.c2
-rw-r--r--test/test-segfault.c3
-rw-r--r--test/test-utils.c2
-rw-r--r--tools/dbus-cleanup-sockets.c4
-rw-r--r--tools/dbus-launch.c11
-rw-r--r--tools/dbus-tree-view.c4
-rw-r--r--tools/dbus-viewer.c4
16 files changed, 23 insertions, 46 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e8d4a25..4516ed85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,14 @@
2005-11-30 John (J5) Palmieri <johnp@redhat.com>
+ * dbus/dbus-auth.c, dbus/dbus-connection.c, dbus/dbus-keyring.c,
+ dbus/dbus-server-debug-pipe.c, glib/dbus-binding-tool-glib.c
+ glib/dbus-glib-tool.c, glib/dbus-gparser.c, glib/dbus-gproxy.c
+ test/test-segfault.c, test/test-utils.c,
+ test/glib/test-dbus-glib.c, tools/dbus-cleanup-sockets.c
+ tools/dbus-launch.c, tools/dbus-tree-view.c, tools/dbus-viewer.c:
+ Various cleanup of dead code and compiler warnings (patch from
+ Kjartan Maraas <kmaraas at gnome.org>)
+
+2005-11-30 John (J5) Palmieri <johnp@redhat.com>
* glib/dbus-gmain.c (connection_setup_add_watch): plugged a leak
(patch from Carlos Garnacho Parro <carlosg at gnome.org>
diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c
index 8c45f625..63348536 100644
--- a/dbus/dbus-auth.c
+++ b/dbus/dbus-auth.c
@@ -543,8 +543,6 @@ sha1_handle_first_client_response (DBusAuth *auth,
if (auth->keyring == NULL)
{
- DBusError error;
-
dbus_error_init (&error);
auth->keyring = _dbus_keyring_new_homedir (data,
&auth->context,
diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
index 31aea4c9..3c8c765d 100644
--- a/dbus/dbus-connection.c
+++ b/dbus/dbus-connection.c
@@ -2762,7 +2762,7 @@ dbus_connection_send_with_reply_and_block (DBusConnection *connection,
_dbus_return_val_if_fail (connection != NULL, NULL);
_dbus_return_val_if_fail (message != NULL, NULL);
- _dbus_return_val_if_fail (timeout_milliseconds >= 0 || timeout_milliseconds == -1, FALSE);
+ _dbus_return_val_if_fail (timeout_milliseconds >= 0 || timeout_milliseconds == -1, NULL);
_dbus_return_val_if_error_is_set (error, NULL);
if (!dbus_connection_send_with_reply (connection, message,
diff --git a/dbus/dbus-keyring.c b/dbus/dbus-keyring.c
index 77d90605..018f45af 100644
--- a/dbus/dbus-keyring.c
+++ b/dbus/dbus-keyring.c
@@ -730,7 +730,7 @@ _dbus_keyring_new_homedir (const DBusString *username,
if (!_dbus_string_init (&homedir))
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
- return FALSE;
+ return NULL;
}
_dbus_string_init_const (&dotdir, ".dbus-keyrings");
@@ -855,7 +855,7 @@ _dbus_keyring_new_homedir (const DBusString *username,
if (keyring)
_dbus_keyring_unref (keyring);
_dbus_string_free (&homedir);
- return FALSE;
+ return NULL;
}
diff --git a/dbus/dbus-server-debug-pipe.c b/dbus/dbus-server-debug-pipe.c
index 9c147c6c..57882d97 100644
--- a/dbus/dbus-server-debug-pipe.c
+++ b/dbus/dbus-server-debug-pipe.c
@@ -289,7 +289,7 @@ _dbus_transport_debug_pipe_new (const char *server_name,
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
_dbus_transport_unref (server_transport);
_dbus_transport_unref (client_transport);
- return FALSE;
+ return NULL;
}
connection = _dbus_connection_new_for_transport (server_transport);
diff --git a/glib/dbus-binding-tool-glib.c b/glib/dbus-binding-tool-glib.c
index 1d480975..fb361280 100644
--- a/glib/dbus-binding-tool-glib.c
+++ b/glib/dbus-binding-tool-glib.c
@@ -1423,7 +1423,6 @@ generate_client_glue (BaseInfo *base, DBusBindingToolCData *data, GError **error
InterfaceInfo *interface;
GSList *methods;
GSList *tmp;
- int count;
char *iface_prefix;
channel = data->channel;
@@ -1431,7 +1430,6 @@ generate_client_glue (BaseInfo *base, DBusBindingToolCData *data, GError **error
interface = (InterfaceInfo *) base;
methods = interface_info_get_methods (interface);
- count = 0;
iface_prefix = iface_to_c_prefix (interface_info_get_name (interface));
diff --git a/glib/dbus-glib-tool.c b/glib/dbus-glib-tool.c
index 228fbf81..2a8844d2 100644
--- a/glib/dbus-glib-tool.c
+++ b/glib/dbus-glib-tool.c
@@ -264,7 +264,6 @@ version (void)
int
main (int argc, char **argv)
{
- const char *prev_arg;
const char *output_file;
const char *prefix;
char *output_file_tmp;
@@ -291,7 +290,6 @@ main (int argc, char **argv)
outputmode = DBUS_BINDING_OUTPUT_NONE;
end_of_args = FALSE;
files = NULL;
- prev_arg = NULL;
output_file = NULL;
prefix = "";
ignore_unsupported = FALSE;
@@ -353,8 +351,6 @@ main (int argc, char **argv)
else
files = g_slist_prepend (files, (char*) arg);
- prev_arg = arg;
-
++i;
}
diff --git a/glib/dbus-gparser.c b/glib/dbus-gparser.c
index bf89492d..f296f961 100644
--- a/glib/dbus-gparser.c
+++ b/glib/dbus-gparser.c
@@ -144,6 +144,7 @@ locate_attributes (const char *element_name,
return retval;
}
+#if 0
static gboolean
check_no_attributes (const char *element_name,
const char **attribute_names,
@@ -162,6 +163,7 @@ check_no_attributes (const char *element_name,
return TRUE;
}
+#endif
struct Parser
{
@@ -367,7 +369,6 @@ parse_method (Parser *parser,
{
const char *name;
MethodInfo *method;
- NodeInfo *top;
if (parser->interface == NULL ||
parser->node_stack == NULL ||
@@ -400,8 +401,6 @@ parse_method (Parser *parser,
return FALSE;
}
- top = parser->node_stack->data;
-
method = method_info_new (name);
interface_info_add_method (parser->interface, method);
method_info_unref (method);
@@ -420,7 +419,6 @@ parse_signal (Parser *parser,
{
const char *name;
SignalInfo *signal;
- NodeInfo *top;
if (parser->interface == NULL ||
parser->node_stack == NULL ||
@@ -453,8 +451,6 @@ parse_signal (Parser *parser,
return FALSE;
}
- top = parser->node_stack->data;
-
signal = signal_info_new (name);
interface_info_add_signal (parser->interface, signal);
signal_info_unref (signal);
@@ -492,7 +488,6 @@ parse_property (Parser *parser,
const char *access;
const char *type;
PropertyInfo *property;
- NodeInfo *top;
PropertyAccessFlags access_flags;
if (parser->interface == NULL ||
@@ -565,8 +560,6 @@ parse_property (Parser *parser,
return FALSE;
}
- top = parser->node_stack->data;
-
property = property_info_new (name, type, access_flags);
interface_info_add_property (parser->interface, property);
property_info_unref (property);
diff --git a/glib/dbus-gproxy.c b/glib/dbus-gproxy.c
index d9469d2f..aa7ae193 100644
--- a/glib/dbus-gproxy.c
+++ b/glib/dbus-gproxy.c
@@ -635,13 +635,11 @@ typedef struct
static void
unassociate_proxies (gpointer key, gpointer val, gpointer user_data)
{
- const char *tri;
DBusGProxyList *list;
const char *name;
GSList *tmp;
DBusGProxyUnassociateData *data;
- tri = key;
list = val;
data = user_data;
name = data->name;
diff --git a/test/glib/test-dbus-glib.c b/test/glib/test-dbus-glib.c
index 86c9f7ec..03a1a736 100644
--- a/test/glib/test-dbus-glib.c
+++ b/test/glib/test-dbus-glib.c
@@ -216,13 +216,11 @@ increment_received_cb (DBusGProxy *proxy,
gpointer data)
{
GError *error;
- char *echo_data;
guint val;
g_assert (!strcmp (data, "moo"));
error = NULL;
- echo_data = NULL;
if (!dbus_g_proxy_end_call (proxy, call, &error,
G_TYPE_UINT, &val,
G_TYPE_INVALID))
diff --git a/test/test-segfault.c b/test/test-segfault.c
index 94b42749..6a99131e 100644
--- a/test/test-segfault.c
+++ b/test/test-segfault.c
@@ -1,4 +1,5 @@
/* This is simply a process that segfaults */
+#include <stdlib.h>
#include <signal.h>
#include <sys/time.h>
@@ -17,7 +18,7 @@ main (int argc, char **argv)
raise (SIGSEGV);
- p = 0;
+ p = NULL;
*p = 'a';
return 0;
diff --git a/test/test-utils.c b/test/test-utils.c
index 5e367d4d..9665eda3 100644
--- a/test/test-utils.c
+++ b/test/test-utils.c
@@ -41,8 +41,6 @@ static void
connection_timeout_callback (DBusTimeout *timeout,
void *data)
{
- CData *cd = data;
-
/* Can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle (timeout);
}
diff --git a/tools/dbus-cleanup-sockets.c b/tools/dbus-cleanup-sockets.c
index f163848c..1cd9b3cd 100644
--- a/tools/dbus-cleanup-sockets.c
+++ b/tools/dbus-cleanup-sockets.c
@@ -376,14 +376,12 @@ version (void)
int
main (int argc, char **argv)
{
- const char *prev_arg;
int i;
int saw_doubledash;
const char *dirname;
saw_doubledash = FALSE;
dirname = NULL;
- prev_arg = NULL;
i = 1;
while (i < argc)
{
@@ -413,8 +411,6 @@ main (int argc, char **argv)
dirname = arg;
}
- prev_arg = arg;
-
++i;
}
diff --git a/tools/dbus-launch.c b/tools/dbus-launch.c
index ad4fd5a4..beb298c1 100644
--- a/tools/dbus-launch.c
+++ b/tools/dbus-launch.c
@@ -137,7 +137,7 @@ read_line (int fd,
while (TRUE)
{
- size_t chunk;
+ ssize_t chunk;
size_t to_read;
again:
@@ -190,7 +190,7 @@ read_pid (int fd,
while (TRUE)
{
- size_t chunk;
+ ssize_t chunk;
size_t to_read;
again:
@@ -323,7 +323,6 @@ kill_bus_when_session_ends (void)
int x_fd;
fd_set read_set;
fd_set err_set;
- int ret;
struct sigaction act;
sigset_t empty_mask;
#ifdef DBUS_BUILD_X11
@@ -336,7 +335,7 @@ kill_bus_when_session_ends (void)
act.sa_handler = signal_handler;
act.sa_mask = empty_mask;
act.sa_flags = 0;
- sigaction (SIGHUP, &act, 0);
+ sigaction (SIGHUP, &act, NULL);
#ifdef DBUS_BUILD_X11
xdisplay = XOpenDisplay (NULL);
@@ -386,8 +385,8 @@ kill_bus_when_session_ends (void)
FD_SET (x_fd, &err_set);
}
- ret = select (MAX (tty_fd, x_fd) + 1,
- &read_set, NULL, &err_set, NULL);
+ select (MAX (tty_fd, x_fd) + 1,
+ &read_set, NULL, &err_set, NULL);
if (got_sighup)
{
diff --git a/tools/dbus-tree-view.c b/tools/dbus-tree-view.c
index b4404457..448d770d 100644
--- a/tools/dbus-tree-view.c
+++ b/tools/dbus-tree-view.c
@@ -223,10 +223,6 @@ model_update (GtkTreeModel *model,
const char **path,
NodeInfo *node)
{
- GtkTreeStore *store;
-
- store = GTK_TREE_STORE (model);
-
if (path[0] == NULL)
{
/* Setting '/' */
diff --git a/tools/dbus-viewer.c b/tools/dbus-viewer.c
index 8eb63dd3..2ff3267f 100644
--- a/tools/dbus-viewer.c
+++ b/tools/dbus-viewer.c
@@ -484,7 +484,6 @@ version (void)
int
main (int argc, char **argv)
{
- const char *prev_arg;
int i;
GSList *files;
gboolean end_of_args;
@@ -506,7 +505,6 @@ main (int argc, char **argv)
services = FALSE;
end_of_args = FALSE;
files = NULL;
- prev_arg = NULL;
i = 1;
while (i < argc)
{
@@ -538,8 +536,6 @@ main (int argc, char **argv)
else
files = g_slist_prepend (files, (char*) arg);
- prev_arg = arg;
-
++i;
}