Fixed issue with crash when invalid get_connections request is made on invalid port...
[ardour.git] / libs / clearlooks-newer / animation.c
index 82af498949e0e16c8f9e3f05c62e224e229f28f7..8339ed7c195dceb36c92411b873a3a72f1837d8a 100644 (file)
@@ -27,7 +27,7 @@
 #include "animation.h"
 
 #ifdef HAVE_ANIMATION
-#include <glib/gtimer.h>
+#include <glib.h>
 
 struct _AnimationInfo {
        GTimer *timer;
@@ -63,7 +63,7 @@ force_widget_redraw (GtkWidget *widget)
 
 /* ensures that the timer is running */
 static void
-start_timer ()
+start_timer (void)
 {
        if (animation_timer_id == 0)
                animation_timer_id = g_timeout_add (ANIMATION_DELAY, animation_timeout_handler, NULL);
@@ -71,7 +71,7 @@ start_timer ()
 
 /* ensures that the timer is stopped */
 static void
-stop_timer ()
+stop_timer (void)
 {
        if (animation_timer_id != 0)
        {
@@ -159,9 +159,12 @@ add_animation (const GtkWidget *widget, gdouble stop_time)
 static gboolean
 update_animation_info (gpointer key, gpointer value, gpointer user_data)
 {
-       AnimationInfo *animation_info = value;
+       AnimationInfo *animation_info;
        GtkWidget *widget = key;
        
+       animation_info = value;
+       (void) user_data;
+       
        g_assert ((widget != NULL) && (animation_info != NULL));
        
        /* remove the widget from the hash table if it is not drawable */
@@ -193,6 +196,8 @@ update_animation_info (gpointer key, gpointer value, gpointer user_data)
 static gboolean
 animation_timeout_handler (gpointer data)
 {
+       (void) data;
+       
        /*g_print("** TICK **\n");*/
        
        /* enter threads as update_animation_info will use gtk/gdk. */
@@ -213,7 +218,10 @@ animation_timeout_handler (gpointer data)
 static void
 on_checkbox_toggle (GtkWidget *widget, gpointer data)
 {
-       AnimationInfo *animation_info = lookup_animation_info (widget);
+       AnimationInfo *animation_info;
+       (void) data;
+       
+       animation_info = lookup_animation_info (widget);
        
        if (animation_info != NULL)
        {
@@ -230,12 +238,14 @@ on_checkbox_toggle (GtkWidget *widget, gpointer data)
 static void
 on_connected_widget_destruction (gpointer data, GObject *widget)
 {
+       (void) widget;
+       
        connected_widgets = g_slist_remove (connected_widgets, data);
        g_free (data);
 }
 
 static void
-disconnect_all_signals ()
+disconnect_all_signals (void)
 {
        GSList * item = connected_widgets;
        while (item != NULL)
@@ -257,7 +267,7 @@ disconnect_all_signals ()
 static gint
 find_signal_info (gconstpointer signal_info, gconstpointer widget)
 {
-       if (((SignalInfo*)signal_info)->widget == widget)
+       if (((const SignalInfo*)signal_info)->widget == widget)
                return 0;
        else
                return 1;
@@ -317,7 +327,7 @@ clearlooks_animation_elapsed (gpointer data)
 
 /* cleans up all resources of the animation system */
 void
-clearlooks_animation_cleanup ()
+clearlooks_animation_cleanup (void)
 {
        disconnect_all_signals ();