Fix compilation warnings

This commit is contained in:
Gaël Bonithon
2021-01-20 19:38:53 +01:00
committed by Simon Steinbeiß
parent 56afa354cf
commit e25b5246b2
5 changed files with 5 additions and 8 deletions

View File

@@ -77,7 +77,7 @@ create_status_icon (void)
} }
static gboolean static gboolean
status_icon_get_visible () status_icon_get_visible (void)
{ {
return status_icon_or_null && gtk_status_icon_get_visible (status_icon_or_null); return status_icon_or_null && gtk_status_icon_get_visible (status_icon_or_null);
} }

View File

@@ -139,7 +139,7 @@ xtm_process_statusbar_set_property (GObject *object, guint property_id, const GV
text = g_strdup_printf (_("CPU: %s%%"), float_value); text = g_strdup_printf (_("CPU: %s%%"), float_value);
gtk_label_set_text (GTK_LABEL (statusbar->label_cpu), text); gtk_label_set_text (GTK_LABEL (statusbar->label_cpu), text);
gdk_rgba_parse (&color, "#ff6e00"); gdk_rgba_parse (&color, "#ff6e00");
gtk_widget_override_color (statusbar->label_cpu, GTK_STATE_NORMAL, &color); gtk_widget_override_color (statusbar->label_cpu, GTK_STATE_FLAG_NORMAL, &color);
g_free (float_value); g_free (float_value);
g_free (text); g_free (text);
break; break;
@@ -150,7 +150,7 @@ xtm_process_statusbar_set_property (GObject *object, guint property_id, const GV
gtk_label_set_text (GTK_LABEL (statusbar->label_memory), text); gtk_label_set_text (GTK_LABEL (statusbar->label_memory), text);
gtk_widget_set_tooltip_text (statusbar->label_memory, text); gtk_widget_set_tooltip_text (statusbar->label_memory, text);
gdk_rgba_parse (&color, "#c22b66"); gdk_rgba_parse (&color, "#c22b66");
gtk_widget_override_color (statusbar->label_memory, GTK_STATE_NORMAL, &color); gtk_widget_override_color (statusbar->label_memory, GTK_STATE_FLAG_NORMAL, &color);
g_free (text); g_free (text);
break; break;

View File

@@ -24,7 +24,6 @@
#include <X11/Xproto.h> #include <X11/Xproto.h>
#include <glib-object.h> #include <glib-object.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
@@ -239,7 +238,6 @@ static void
xtm_process_window_init (XtmProcessWindow *window) xtm_process_window_init (XtmProcessWindow *window)
{ {
GtkWidget *button; GtkWidget *button;
GtkWidget *icon;
gint width, height; gint width, height;
gboolean show_legend; gboolean show_legend;

View File

@@ -12,7 +12,6 @@
#endif #endif
#include <glib-object.h> #include <glib-object.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <libxfce4ui/libxfce4ui.h> #include <libxfce4ui/libxfce4ui.h>
@@ -79,7 +78,7 @@ combobox_foreach (GtkTreeModel *model,
gtk_tree_model_get_value (model, iter, 0, &prop); gtk_tree_model_get_value (model, iter, 0, &prop);
if (g_value_get_int (&prop) == refresh_rate->rate) if ((guint) g_value_get_int (&prop) == refresh_rate->rate)
{ {
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (refresh_rate->combobox), iter); gtk_combo_box_set_active_iter (GTK_COMBO_BOX (refresh_rate->combobox), iter);
return TRUE; return TRUE;

View File

@@ -101,7 +101,7 @@ gboolean set_priority_to_pid (GPid pid, gint priority);
# define __unused __attribute__((__unused__)) # define __unused __attribute__((__unused__))
#endif #endif
#if DEBUG #ifdef DEBUG
# define G_DEBUG_FMT(fmt, args...) g_debug((fmt), ##args) # define G_DEBUG_FMT(fmt, args...) g_debug((fmt), ##args)
#else #else
# define G_DEBUG_FMT(fmt, args...) # define G_DEBUG_FMT(fmt, args...)