diff options
author | zhuyaliang <[email protected]> | 2023-04-22 12:56:21 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-04-28 00:38:32 +0200 |
commit | 6148063f860bf23d970199fd74a9efdf547be834 (patch) | |
tree | b5756324ac8fae1b79ba402d4d887989e6314c8b /sensors-applet/active-sensor.c | |
parent | 68740373619824398f0c16c39ca12ed8ac1e275c (diff) | |
download | mate-sensors-applet-6148063f860bf23d970199fd74a9efdf547be834.tar.bz2 mate-sensors-applet-6148063f860bf23d970199fd74a9efdf547be834.tar.xz |
Fix Compilation Warning
Diffstat (limited to 'sensors-applet/active-sensor.c')
-rw-r--r-- | sensors-applet/active-sensor.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sensors-applet/active-sensor.c b/sensors-applet/active-sensor.c index d273b1b..fdd10c3 100644 --- a/sensors-applet/active-sensor.c +++ b/sensors-applet/active-sensor.c @@ -261,7 +261,7 @@ static void active_sensor_update_graph(ActiveSensor *as, cairo_t *cr) { GtkAllocation allocation; gdouble line_height; gdouble width, height; - gdouble x, y; + gdouble x = 0.0, y = 0.0; cairo_pattern_t *pattern; gint i; @@ -344,6 +344,7 @@ void active_sensor_destroy(ActiveSensor *active_sensor) { g_free(active_sensor); } +static gboolean graph_draw_cb(GtkWidget *graph, cairo_t *cr, gpointer data) { @@ -502,7 +503,6 @@ void active_sensor_update(ActiveSensor *active_sensor, GdkPixbuf *icon_pixbuf; gchar *graph_color; gint label_min_width; - gint label_width; GtkRequisition req; /* to build the list of labels as we go */ @@ -727,7 +727,6 @@ void active_sensor_update(ActiveSensor *active_sensor, gtk_label_set_markup(GTK_LABEL(active_sensor->value), value_text); gtk_widget_get_preferred_size (GTK_WIDGET (active_sensor->value), &req, NULL); - label_width = MAX(req.width, label_min_width); gtk_widget_set_size_request (GTK_WIDGET (active_sensor->value), label_min_width, req.height); if (tooltip) { |