* cspi/bonobo/cspi-bonobo-listener.h:
* cspi/bonobo/cspi-bonobo.c: (cspi_init):
* cspi/spi_hypertext.c: (AccessibleHypertext_getLink):
* cspi/spi_main.c: (SPI_eventIsReady):
* cspi/spi_streamablecontent.c: (AccessibleStreamableContent_read):
* libspi/streamablecontent.c:
* libspi/util.c: (spi_re_entrant_list_delete_link):
* login-helper/login-helper.c:
* registryd/deviceeventcontroller.c:
(spi_controller_update_key_grabs), (isEvent):
* registryd/registry.c:
* test/key-listener-test.c: (simple_at_exit):
* test/login-helper-server-test.c: (test_set_wm_dock),
(test_post_window):
Fix a bunch of warnings from sparse:
- ANSIfication of function declarations
- NULL vs 0
- Add some prototypes
- make some stuff static
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@882
e2bd861d-eb25-0410-b326-
f6ed22b6b98c
} CSpiDeviceListener;
typedef SpiDeviceListenerClass CSpiDeviceListenerClass;
+CORBA_Object
+cspi_device_listener_get_corba (AccessibleDeviceListener *listener);
GType cspi_device_listener_get_type (void);
gpointer cspi_device_listener_new (void);
void cspi_device_listener_add_cb (AccessibleDeviceListener *al,
CORBA_Object
cspi_init (void)
{
- char *obj_id;
- CORBA_Object registry;
+ CORBA_Object registry = NULL;
CORBA_Environment ev;
char *ior = NULL;
- if (!bonobo_init (0, NULL))
+ if (!bonobo_init (NULL, NULL))
{
g_error ("Could not initialize Bonobo");
}
{
AccessibleHyperlink *retval;
- cspi_return_val_if_fail (obj != NULL, FALSE);
+ cspi_return_val_if_fail (obj != NULL, NULL);
retval = cspi_object_add (
Accessibility_Hypertext_getLink (CSPI_OBJREF (obj),
#undef DEBUG_OBJECTS
-static CORBA_Environment ev = { 0 };
+static CORBA_Environment ev = { NULL };
static Accessibility_Registry registry = CORBA_OBJECT_NIL;
static GHashTable *live_refs = NULL;
static GQueue *exception_handlers = NULL;
*
**/
SPIBoolean
-SPI_eventIsReady ()
+SPI_eventIsReady (void)
{
return FALSE;
}
cached = g_hash_table_lookup (get_streams (), CSPI_OBJREF (obj));
if (cached)
{
- CORBA_long len_read;
+ CORBA_long len_read = 0;
stream = cached->stream;
if (stream != CORBA_OBJECT_NIL)
{
#include <config.h>
#include <stdio.h>
+#include <string.h>
#include <libspi/accessible.h>
#include <libspi/component.h>
#include <libspi/streamablecontent.h>
next = element->next;
first_item = (element->prev == NULL);
- g_list_remove_link (NULL, element);
+ element = g_list_remove_link (NULL, element);
for (l = working_list; l; l = l->next)
{
(G_OBJECT_CLASS (bonobo_object_parent_class))->finalize (object);
}
-gboolean
+static gboolean
login_helper_set_safe (LoginHelper *helper, gboolean safe)
{
LoginHelperClass *klass = LOGIN_HELPER_GET_CLASS (helper);
return login_helper_set_safe (helper, safe);
}
-LoginHelperDeviceReqFlags
+static LoginHelperDeviceReqFlags
login_helper_get_device_reqs (LoginHelper *helper)
{
LoginHelperClass *klass = LOGIN_HELPER_GET_CLASS (helper);
return list;
}
-Window*
+static Window*
login_helper_get_raise_windows (LoginHelper *helper)
{
LoginHelperClass *klass = LOGIN_HELPER_GET_CLASS (helper);
static GQuark spi_dec_private_quark = 0;
-int (*x_default_error_handler) (Display *display, XErrorEvent *error_event);
+static int (*x_default_error_handler) (Display *display, XErrorEvent *error_event);
typedef enum {
SPI_DEVICE_TYPE_KBD,
return GDK_FILTER_CONTINUE;
}
-int
+static int
_spi_controller_device_error_handler (Display *display, XErrorEvent *error)
{
if (error->error_code == BadAccess)
{
GList *l, *next;
gboolean update_failed = FALSE;
- KeyCode keycode;
+ KeyCode keycode = 0;
g_return_val_if_fail (controller != NULL, FALSE);
}
#ifdef HAVE_XEVIE
-Bool isEvent(dpy,event,arg)
- Display *dpy;
- XEvent *event;
- char *arg;
+static Bool isEvent(Display *dpy, XEvent *event, char *arg)
{
return TRUE;
}
-gboolean
+static gboolean
handle_io (GIOChannel *source,
GIOCondition condition,
gpointer data)
_dbg = (int) g_ascii_strtod (debug_flag_string, NULL);
}
-SpiListenerStruct *
+static SpiListenerStruct *
spi_listener_struct_new (Accessibility_EventListener listener, CORBA_Environment *ev)
{
SpiListenerStruct *retval = g_malloc (sizeof (SpiListenerStruct));
}
-void
+static void
spi_listener_struct_free (SpiListenerStruct *ls, CORBA_Environment *ev)
{
bonobo_object_release_unref (ls->listener, ev);
}
static void
-simple_at_exit ()
+simple_at_exit (void)
{
SPI_deregisterAccessibleKeystrokeListener (command_key_listener, SPI_KEYMASK_ALT | SPI_KEYMASK_CONTROL);
AccessibleKeystrokeListener_unref (command_key_listener);
void
-test_set_wm_dock ()
+test_set_wm_dock (void)
{
Atom atom_type[1], atom_window_type;
}
static void
-test_post_window ()
+test_post_window (void)
{
mainwin = gtk_window_new (GTK_WINDOW_TOPLEVEL);