Commit 8e7bfdb3 authored by Gaël Bonithon's avatar Gaël Bonithon
Browse files

Fix compilation warnings

parent 51166f9d
Pipeline #6362 passed with stages
in 1 minute and 39 seconds
......@@ -90,7 +90,8 @@ static GQuark tvp_action_arg_quark = 0;
static void tvp_action_exec (ThunarxMenuItem *item, TvpGitAction *tvp_action);
static void tvp_action_unimplemented (ThunarxMenuItem *, const gchar *);
/* remove G_GNUC_UNUSED if this function is ever used, or the function itself if it is useless */
static void tvp_action_unimplemented (ThunarxMenuItem *, const gchar *) G_GNUC_UNUSED;
......
......@@ -142,6 +142,16 @@ tvp_provider_init (TvpProvider *tvp_provider)
static gboolean
tvp_spawn_close_pid (gpointer data)
{
g_spawn_close_pid (GPOINTER_TO_INT (data));
return FALSE;
}
static void
tvp_provider_finalize (GObject *object)
{
......@@ -150,7 +160,7 @@ tvp_provider_finalize (GObject *object)
if (tvp_provider->child_watch)
{
GSource *source = g_main_context_find_source_by_id (NULL, tvp_provider->child_watch->watch_id);
g_source_set_callback (source, (GSourceFunc) g_spawn_close_pid, NULL, NULL);
g_source_set_callback (source, tvp_spawn_close_pid, NULL, NULL);
}
#ifdef HAVE_SUBVERSION
......@@ -589,7 +599,7 @@ tvp_new_process (ThunarxMenuItem *item, const GPid *pid, const gchar *path, TvpP
if (tvp_provider->child_watch)
{
GSource *source = g_main_context_find_source_by_id (NULL, tvp_provider->child_watch->watch_id);
g_source_set_callback (source, (GSourceFunc) g_spawn_close_pid, NULL, NULL);
g_source_set_callback (source, tvp_spawn_close_pid, NULL, NULL);
}
watch = g_new(TvpChildWatch, 1);
watch->pid = *pid;
......
......@@ -270,20 +270,10 @@ tgh_cell_renderer_graph_render (GtkCellRenderer *cell, cairo_t *cr, GtkWidget *w
gint x2_offset;
gint x;
gboolean rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
GtkStateType state;
gint xpad;
gfloat xalign;
GdkRGBA fg;
if (flags & GTK_CELL_RENDERER_INSENSITIVE)
state = GTK_STATE_INSENSITIVE;
else if (flags & GTK_CELL_RENDERER_SELECTED)
state = GTK_STATE_SELECTED;
else if (flags & GTK_CELL_RENDERER_PRELIT)
state = GTK_STATE_PRELIGHT;
else
state = GTK_STATE_NORMAL;
gtk_cell_renderer_get_padding (cell, &xpad, NULL);
gtk_cell_renderer_get_alignment (cell, &xalign, NULL);
......
......@@ -490,6 +490,12 @@ cancel_clicked (GtkButton *button, gpointer user_data)
g_signal_emit (dialog, signals[SIGNAL_CANCEL], 0);
}
static void
tvp_graph_node_free (gpointer data)
{
tgh_graph_node_free ((TghGraphNode *) data);
}
static void
refresh_clicked (GtkButton *button, gpointer user_data)
{
......@@ -504,8 +510,7 @@ refresh_clicked (GtkButton *button, gpointer user_data)
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->tree_view));
gtk_list_store_clear (GTK_LIST_STORE (model));
g_list_foreach(dialog->graph, (GFunc)tgh_graph_node_free, NULL);
g_list_free (dialog->graph);
g_list_free_full (dialog->graph, tvp_graph_node_free);
dialog->graph = NULL;
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->text_view)), "", -1);
......
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