Commit 0ca96ec5 authored by John Palmieri's avatar John Palmieri

* 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>)
parent 111118fd
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
......
......@@ -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,
......
......@@ -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,
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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));
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
......
......@@ -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))
......
/* 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;
......
......@@ -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);
}
......
......@@ -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;
}
......
......@@ -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)
{
......
......@@ -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 '/' */
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment