Remove set but unread variables
- Adding a sensor in the mbmon support stored the added sensor in a pointer but never used it afterwards - Drop pixbuf width in draw_left_frame_overlap, the code unlike other drawing helpers does not use the pixbuf width - Remove unused scroll selection from net_stats_page This fixes several set but unread warnings when compiling with a recent gcc (encountered with gcc 4.8.2).
This commit is contained in:
parent
720ac43b8c
commit
b279d76837
|
@ -540,12 +540,10 @@ cb_cpu_extra(GtkWidget *widget, GdkEventButton *ev)
|
|||
{
|
||||
GList *list;
|
||||
CpuMon *cpu;
|
||||
GkrellmChart *cp;
|
||||
|
||||
for (list = cpu_mon_list; list; list = list->next)
|
||||
{
|
||||
cpu = (CpuMon *) list->data;
|
||||
cp = cpu->chart;
|
||||
if (widget != cpu->chart->drawing_area)
|
||||
continue;
|
||||
if (ev->button == 1 && ev->type == GDK_BUTTON_PRESS)
|
||||
|
@ -968,12 +966,10 @@ static void
|
|||
create_alert(void)
|
||||
{
|
||||
GList *list;
|
||||
CpuMon *cpu;
|
||||
|
||||
list = g_list_nth(cpu_mon_list, 0);
|
||||
if (!list)
|
||||
return;
|
||||
cpu = (CpuMon *) list->data;
|
||||
cpu_alert = gkrellm_alert_create(NULL, _("CPU"),
|
||||
_("Percent Usage"),
|
||||
TRUE, FALSE, TRUE,
|
||||
|
|
7
src/fs.c
7
src/fs.c
|
@ -1034,7 +1034,6 @@ cb_panel_motion(GtkWidget *widget, GdkEventButton *ev)
|
|||
GList *list;
|
||||
FSmon *fs;
|
||||
GkrellmDecal *d;
|
||||
PangoFontDescription *font_desc;
|
||||
gchar buf[128];
|
||||
gint w, x_delta = 0;
|
||||
|
||||
|
@ -1047,7 +1046,6 @@ cb_panel_motion(GtkWidget *widget, GdkEventButton *ev)
|
|||
fs_in_motion = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
font_desc = gkrellm_meter_alt_textstyle(style_id)->font;
|
||||
|
||||
d = fs_in_motion->data_decal;
|
||||
format_fs_data(fs_in_motion, data_format_locale, buf, sizeof(buf));
|
||||
|
@ -2201,15 +2199,10 @@ row_drop_possible(GtkTreeDragDest *drag_dest, GtkTreePath *path,
|
|||
GtkSelectionData *selection_data)
|
||||
{
|
||||
GtkTreePath *src_path;
|
||||
gint *indices;
|
||||
|
||||
if (!row_reference)
|
||||
return FALSE;
|
||||
src_path = gtk_tree_row_reference_get_path(row_reference);
|
||||
indices = gtk_tree_path_get_indices(path);
|
||||
// g_debug("drop path: indices=[%d,%d]:%d, path=%s\n",
|
||||
// indices[0], indices[1], gtk_tree_path_get_depth(path),
|
||||
// gtk_tree_path_to_string(path));
|
||||
|
||||
if ( gtk_tree_path_get_depth(src_path) == 1
|
||||
|| gtk_tree_path_get_depth(path) != 2
|
||||
|
|
|
@ -520,7 +520,6 @@ static void
|
|||
update_inet(void)
|
||||
{
|
||||
InetMon *in;
|
||||
GkrellmChart *cp;
|
||||
ActiveTCP *tcp;
|
||||
GList *list;
|
||||
gchar buf[32], *ap;
|
||||
|
@ -575,7 +574,6 @@ update_inet(void)
|
|||
for (list = inet_mon_list; list; list = list->next)
|
||||
{
|
||||
in = (InetMon *) list->data;
|
||||
cp = in->chart;
|
||||
if (GK.hour_tick)
|
||||
{
|
||||
if (!*in->label0)
|
||||
|
|
|
@ -979,11 +979,10 @@ draw_left_frame_overlap(GdkPixbuf *pixbuf, GkrellmBorder *border,
|
|||
GkrellmPiximage piximage;
|
||||
GdkPixmap *pixmap = NULL;
|
||||
GdkBitmap *mask = NULL;
|
||||
gint w_pixbuf, h_pixbuf;
|
||||
gint h_pixbuf;
|
||||
|
||||
if (overlap <= 0)
|
||||
return;
|
||||
w_pixbuf = gdk_pixbuf_get_width(pixbuf);
|
||||
h_pixbuf = gdk_pixbuf_get_height(pixbuf);
|
||||
piximage.pixbuf = gdk_pixbuf_new_subpixbuf(pixbuf, 0, 0,
|
||||
overlap, h_pixbuf);
|
||||
|
|
|
@ -670,7 +670,6 @@ net_stats_page(GtkWidget *vbox, NetMon *net,
|
|||
{
|
||||
GtkTreeView *treeview;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeSelection *selection;
|
||||
GtkCellRenderer *renderer;
|
||||
gint i;
|
||||
|
||||
|
@ -704,7 +703,7 @@ net_stats_page(GtkWidget *vbox, NetMon *net,
|
|||
renderer, "text", TIME_COLUMN, NULL);
|
||||
break;
|
||||
}
|
||||
selection = gkrellm_gtk_scrolled_selection(treeview, vbox,
|
||||
gkrellm_gtk_scrolled_selection(treeview, vbox,
|
||||
GTK_SELECTION_NONE,
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC,
|
||||
NULL, NULL);
|
||||
|
|
|
@ -1512,7 +1512,6 @@ cb_place_button(GtkWidget *widget, gpointer data)
|
|||
GSList *group;
|
||||
GList *list;
|
||||
GkrellmMonitor *mon;
|
||||
GkrellmMonprivate *mp;
|
||||
gint i;
|
||||
|
||||
if (gkrellm_demo_mode())
|
||||
|
@ -1540,7 +1539,6 @@ cb_place_button(GtkWidget *widget, gpointer data)
|
|||
for (i = 0, list = gkrellm_monitor_list; list; list = list->next)
|
||||
{
|
||||
mon = (GkrellmMonitor *) list->data;
|
||||
mp = mon->privat;
|
||||
mon->privat->button_id = -1;
|
||||
if (MONITOR_ID(mon) != MON_PLUGIN)
|
||||
{
|
||||
|
|
|
@ -2333,7 +2333,6 @@ static void
|
|||
create_location_menu(gint group)
|
||||
{
|
||||
gint n, n_cpus;
|
||||
static gint sig_id;
|
||||
|
||||
if (group == sensor_last_group)
|
||||
return;
|
||||
|
@ -2357,7 +2356,7 @@ create_location_menu(gint group)
|
|||
{
|
||||
gtk_combo_box_append_text(GTK_COMBO_BOX(optionmenu), _("Disk"));
|
||||
}
|
||||
sig_id = g_signal_connect(G_OBJECT(optionmenu), "changed",
|
||||
g_signal_connect(G_OBJECT(optionmenu), "changed",
|
||||
G_CALLBACK(cb_location_menu), NULL);
|
||||
}
|
||||
|
||||
|
@ -2437,7 +2436,7 @@ cb_tree_selection_changed(GtkTreeSelection *selection, gpointer data)
|
|||
GtkTreeModel *model;
|
||||
GtkTreePath *path;
|
||||
Sensor *s;
|
||||
gint *indices, depth;
|
||||
gint depth;
|
||||
|
||||
if (!gtk_tree_selection_get_selected(selection, &model, &iter))
|
||||
{
|
||||
|
@ -2446,11 +2445,7 @@ cb_tree_selection_changed(GtkTreeSelection *selection, gpointer data)
|
|||
return;
|
||||
}
|
||||
path = gtk_tree_model_get_path(model, &iter);
|
||||
indices = gtk_tree_path_get_indices(path);
|
||||
depth = gtk_tree_path_get_depth(path);
|
||||
//g_debug("selection: indices=[%d,%d]:%d, path=%s\n",
|
||||
// indices[0], indices[1], gtk_tree_path_get_depth(path),
|
||||
// gtk_tree_path_to_string(path));
|
||||
change_row_reference(model, path);
|
||||
gtk_tree_path_free(path);
|
||||
|
||||
|
|
|
@ -130,7 +130,6 @@ static gboolean
|
|||
mbmon_daemon_read(void)
|
||||
{
|
||||
gchar *server = "127.0.0.1";
|
||||
gpointer sr;
|
||||
MbmonSensor *mb;
|
||||
gchar *default_label, *id_name;
|
||||
gchar name[32], buf[256];
|
||||
|
@ -193,7 +192,7 @@ mbmon_daemon_read(void)
|
|||
mb->name = g_strdup(name);
|
||||
default_label = name;
|
||||
id_name = g_strdup_printf("mbmon/%s", name);
|
||||
sr = gkrellm_sensors_add_sensor(type,
|
||||
gkrellm_sensors_add_sensor(type,
|
||||
name, id_name,
|
||||
0, 0, MBMON_INTERFACE,
|
||||
1.0, 0.0, NULL, default_label);
|
||||
|
|
Loading…
Reference in New Issue