[gnumeric] remove some warnings
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] remove some warnings
- Date: Mon, 21 Nov 2011 18:18:53 +0000 (UTC)
commit 89b40898fa39c9b7d4a2670f18b30af0dd57d3e7
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Mon Nov 21 11:18:16 2011 -0700
remove some warnings
2011-11-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-analysis-tool-kaplan-meier.c: remove unused variables
and mark unused parameters
* dialog-analysis-tool-sign-test.c: ditto
* dialog-analysis-tools.c: ditto
* dialog-autoformat.c: ditto
* dialog-cell-format-cond.c: ditto
src/dialogs/ChangeLog | 9 ++++
src/dialogs/dialog-analysis-tool-kaplan-meier.c | 7 ++-
src/dialogs/dialog-analysis-tool-sign-test.c | 6 +--
src/dialogs/dialog-analysis-tools.c | 47 ++++++++++-------------
src/dialogs/dialog-autoformat.c | 3 +-
src/dialogs/dialog-cell-format-cond.c | 16 ++++---
6 files changed, 47 insertions(+), 41 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 47dabe0..7c60523 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,12 @@
+2011-11-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * dialog-analysis-tool-kaplan-meier.c: remove unused variables
+ and mark unused parameters
+ * dialog-analysis-tool-sign-test.c: ditto
+ * dialog-analysis-tools.c: ditto
+ * dialog-autoformat.c: ditto
+ * dialog-cell-format-cond.c: ditto
+
2011-11-20 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-printer-setup.c (do_setup_error_display): rename
diff --git a/src/dialogs/dialog-analysis-tool-kaplan-meier.c b/src/dialogs/dialog-analysis-tool-kaplan-meier.c
index f3440d5..9d7e3f5 100644
--- a/src/dialogs/dialog-analysis-tool-kaplan-meier.c
+++ b/src/dialogs/dialog-analysis-tool-kaplan-meier.c
@@ -200,11 +200,14 @@ kaplan_meier_tool_update_sensitivity_cb (G_GNUC_UNUSED GtkWidget *dummy,
}
static gboolean
-kaplan_meier_tool_get_groups_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
+kaplan_meier_tool_get_groups_cb (GtkTreeModel *model,
+ G_GNUC_UNUSED GtkTreePath *path,
+ GtkTreeIter *iter,
gpointer data)
{
GSList **list = data;
- analysis_tools_kaplan_meier_group_t *group_item = g_new0 (analysis_tools_kaplan_meier_group_t, 1);
+ analysis_tools_kaplan_meier_group_t *group_item =
+ g_new0 (analysis_tools_kaplan_meier_group_t, 1);
gtk_tree_model_get (model, iter,
GROUP_NAME, &(group_item->name),
diff --git a/src/dialogs/dialog-analysis-tool-sign-test.c b/src/dialogs/dialog-analysis-tool-sign-test.c
index bb1e12f..9c70930 100644
--- a/src/dialogs/dialog-analysis-tool-sign-test.c
+++ b/src/dialogs/dialog-analysis-tool-sign-test.c
@@ -193,7 +193,6 @@ sign_test_two_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data_analysis_output_t *dao;
GtkWidget *w;
analysis_tools_data_sign_test_two_t *data;
- gboolean err;
analysis_tool_engine engine;
data = g_new0 (analysis_tools_data_sign_test_two_t, 1);
@@ -209,7 +208,7 @@ sign_test_two_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.labels = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (w));
- err = entry_to_float
+ entry_to_float
(GTK_ENTRY (state->median_entry), &data->median, FALSE);
data->base.alpha = gtk_spin_button_get_value
@@ -308,7 +307,6 @@ sign_test_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data_analysis_output_t *dao;
GtkWidget *w;
analysis_tools_data_sign_test_t *data;
- gboolean err;
analysis_tool_engine engine;
data = g_new0 (analysis_tools_data_sign_test_t, 1);
@@ -322,7 +320,7 @@ sign_test_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->base.labels = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (w));
- err = entry_to_float
+ entry_to_float
(GTK_ENTRY (state->median_entry), &data->median, FALSE);
data->alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
diff --git a/src/dialogs/dialog-analysis-tools.c b/src/dialogs/dialog-analysis-tools.c
index 3d55f6f..b9eaabf 100644
--- a/src/dialogs/dialog-analysis-tools.c
+++ b/src/dialogs/dialog-analysis-tools.c
@@ -1052,7 +1052,6 @@ cb_desc_stat_tool_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
analysis_tools_data_descriptive_t *data;
GtkWidget *w;
- gint err;
data = g_new0 (analysis_tools_data_descriptive_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
@@ -1077,9 +1076,9 @@ cb_desc_stat_tool_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
(GTK_SPIN_BUTTON (state->c_entry));
if (data->kth_largest == 1)
- err = entry_to_int (GTK_ENTRY (state->l_entry), &data->k_largest, TRUE);
+ entry_to_int (GTK_ENTRY (state->l_entry), &data->k_largest, TRUE);
if (data->kth_smallest == 1)
- err = entry_to_int (GTK_ENTRY (state->s_entry), &data->k_smallest, TRUE);
+ entry_to_int (GTK_ENTRY (state->s_entry), &data->k_smallest, TRUE);
w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
@@ -1698,7 +1697,6 @@ ftest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
analysis_tools_data_generic_b_t *data;
GtkWidget *w;
- gint err;
data = g_new0 (analysis_tools_data_generic_b_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
@@ -1717,7 +1715,7 @@ ftest_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- err = entry_to_float (GTK_ENTRY (state->alpha_entry), &data->alpha, TRUE);
+ entry_to_float (GTK_ENTRY (state->alpha_entry), &data->alpha, TRUE);
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_ftest_engine, TRUE))
@@ -1921,7 +1919,6 @@ sampling_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
analysis_tools_data_sampling_t *data;
GtkWidget *w;
- gint err;
data = g_new0 (analysis_tools_data_sampling_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
@@ -1938,14 +1935,14 @@ sampling_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->periodic = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->periodic_button));
if (data->periodic) {
- err = entry_to_int (GTK_ENTRY (state->period_entry), &data->period, TRUE);
- err = entry_to_int (GTK_ENTRY (state->offset_entry), &data->offset, TRUE);
+ entry_to_int (GTK_ENTRY (state->period_entry), &data->period, TRUE);
+ entry_to_int (GTK_ENTRY (state->offset_entry), &data->offset, TRUE);
data->row_major = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->row_major_button));
} else
- err = entry_to_int (GTK_ENTRY (state->random_entry), &data->size, TRUE);
+ entry_to_int (GTK_ENTRY (state->random_entry), &data->size, TRUE);
- err = entry_to_int (GTK_ENTRY (state->number_entry), &data->number, TRUE);
+ entry_to_int (GTK_ENTRY (state->number_entry), &data->number, TRUE);
if (!cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg), state->base.sheet,
dao, data, analysis_tool_sampling_engine, TRUE))
@@ -2154,9 +2151,8 @@ regression_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
analysis_tools_data_regression_t *data;
GtkWidget *w;
- gint err;
gnm_float confidence;
- gint y_h, y_w;
+ gint y_h;
if (state->base.warning_dialog != NULL)
gtk_widget_destroy (state->base.warning_dialog);
@@ -2172,14 +2168,13 @@ regression_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
(GNM_EXPR_ENTRY (state->base.input_entry_2), state->base.sheet);
y_h = regression_tool_calc_height(data->base.range_2);
- y_w = regression_tool_calc_width (data->base.range_2);
data->group_by = (y_h == 1) ? GROUPED_BY_ROW : GROUPED_BY_COL;
w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- err = entry_to_float (GTK_ENTRY (state->confidence_entry), &confidence, TRUE);
+ entry_to_float (GTK_ENTRY (state->confidence_entry), &confidence, TRUE);
data->base.alpha = 1 - confidence;
w = go_gtk_builder_get_widget (state->base.gui, "intercept-button");
@@ -2489,7 +2484,6 @@ exp_smoothing_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
analysis_tools_data_exponential_smoothing_t *data;
GtkWidget *w;
- gint err;
data = g_new0 (analysis_tools_data_exponential_smoothing_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
@@ -2501,13 +2495,14 @@ exp_smoothing_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- err = entry_to_float (GTK_ENTRY (state->damping_fact_entry), &data->damp_fact, TRUE);
- err = entry_to_float (GTK_ENTRY (state->g_damping_fact_entry),
- &data->g_damp_fact, TRUE);
- err = entry_to_float (GTK_ENTRY (state->s_damping_fact_entry),
- &data->s_damp_fact, TRUE);
- err = entry_to_int (GTK_ENTRY (state->s_period_entry),
- &data->s_period, TRUE);
+ entry_to_float (GTK_ENTRY (state->damping_fact_entry),
+ &data->damp_fact, TRUE);
+ entry_to_float (GTK_ENTRY (state->g_damping_fact_entry),
+ &data->g_damp_fact, TRUE);
+ entry_to_float (GTK_ENTRY (state->s_damping_fact_entry),
+ &data->s_damp_fact, TRUE);
+ entry_to_int (GTK_ENTRY (state->s_period_entry),
+ &data->s_period, TRUE);
data->std_error_flag = gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (state->show_std_errors));
@@ -2833,7 +2828,6 @@ average_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
analysis_tools_data_moving_average_t *data;
GtkWidget *w;
- gint err;
data = g_new0 (analysis_tools_data_moving_average_t, 1);
dao = parse_output ((GenericToolState *)state, NULL);
@@ -2845,8 +2839,8 @@ average_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
w = go_gtk_builder_get_widget (state->base.gui, "labels_button");
data->base.labels = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
- err = entry_to_int (GTK_ENTRY (state->interval_entry), &data->interval, TRUE);
- err = entry_to_int (GTK_ENTRY (state->offset_spin), &data->offset, TRUE);
+ entry_to_int (GTK_ENTRY (state->interval_entry), &data->interval, TRUE);
+ entry_to_int (GTK_ENTRY (state->offset_spin), &data->offset, TRUE);
data->std_error_flag = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->show_std_errors));
data->show_graph = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (state->graph_button));
@@ -3583,7 +3577,6 @@ anova_two_factor_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
{
data_analysis_output_t *dao;
GtkWidget *w;
- gint err;
analysis_tools_data_anova_two_factor_t *data;
char *text;
@@ -3604,7 +3597,7 @@ anova_two_factor_tool_ok_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
data->alpha = gtk_spin_button_get_value
(GTK_SPIN_BUTTON (state->alpha_entry));
- err = entry_to_int (GTK_ENTRY (state->replication_entry),
+ entry_to_int (GTK_ENTRY (state->replication_entry),
&data->replication, TRUE);
if (cmd_analysis_tool (WORKBOOK_CONTROL (state->base.wbcg),
diff --git a/src/dialogs/dialog-autoformat.c b/src/dialogs/dialog-autoformat.c
index b4a6191..c272895 100644
--- a/src/dialogs/dialog-autoformat.c
+++ b/src/dialogs/dialog-autoformat.c
@@ -538,7 +538,8 @@ static const char *ui_description =
"</ui>";
static gboolean
-cb_canvas_focus (GtkWidget *canvas, GtkDirectionType direction,
+cb_canvas_focus (GtkWidget *canvas,
+ G_GNUC_UNUSED GtkDirectionType direction,
AutoFormatState *state)
{
if (!gtk_widget_has_focus (canvas)) {
diff --git a/src/dialogs/dialog-cell-format-cond.c b/src/dialogs/dialog-cell-format-cond.c
index 5b690cb..5cab689 100644
--- a/src/dialogs/dialog-cell-format-cond.c
+++ b/src/dialogs/dialog-cell-format-cond.c
@@ -393,7 +393,7 @@ c_fmt_dialog_get_condition (CFormatState *state)
}
static void
-cb_c_fmt_dialog_add_button (GtkWidget *btn, CFormatState *state)
+cb_c_fmt_dialog_add_button (G_GNUC_UNUSED GtkWidget *btn, CFormatState *state)
{
GnmStyleCond *cond = c_fmt_dialog_get_condition (state);
c_fmt_dialog_apply_add_choice (state, cond, TRUE);
@@ -401,7 +401,7 @@ cb_c_fmt_dialog_add_button (GtkWidget *btn, CFormatState *state)
}
static void
-cb_c_fmt_dialog_replace_button (GtkWidget *btn, CFormatState *state)
+cb_c_fmt_dialog_replace_button (G_GNUC_UNUSED GtkWidget *btn, CFormatState *state)
{
GnmStyleCond *cond = c_fmt_dialog_get_condition (state);
c_fmt_dialog_apply_add_choice (state, cond, FALSE);
@@ -409,7 +409,7 @@ cb_c_fmt_dialog_replace_button (GtkWidget *btn, CFormatState *state)
}
static void
-cb_c_fmt_dialog_copy_button (GtkWidget *btn, CFormatState *state)
+cb_c_fmt_dialog_copy_button (G_GNUC_UNUSED GtkWidget *btn, CFormatState *state)
{
GnmStyleConditions *sc;
GtkTreeIter iter;
@@ -597,7 +597,8 @@ c_fmt_dialog_condition_setter (SheetView *sv, GnmRange const *range, CFormatStat
}
static gboolean
-c_fmt_dialog_condition_setter_tiled (SheetView *sv, GnmRange const *range, CFormatState *state)
+c_fmt_dialog_condition_setter_tiled (G_GNUC_UNUSED SheetView *sv, GnmRange const *range,
+ CFormatState *state)
{
GnmStyleList *l, *list;
if (state->action.existing_conds_only)
@@ -1000,7 +1001,8 @@ c_fmt_dialog_conditions_page_load_conditions (GnmStyle *style, char const *range
}
static gboolean
-c_fmt_dialog_condition_collector (SheetView *sv, GnmRange const *range, gpointer user_data)
+c_fmt_dialog_condition_collector (G_GNUC_UNUSED SheetView *sv, GnmRange const *range,
+ gpointer user_data)
{
CFormatState *state = user_data;
GnmStyleList *l, *list = sheet_style_collect_conditions (state->sheet, range);
@@ -1086,7 +1088,7 @@ c_fmt_dialog_load (CFormatState *state)
}
static void
-cb_selection_changed (GtkTreeSelection *treeselection, CFormatState *state)
+cb_selection_changed (G_GNUC_UNUSED GtkTreeSelection *treeselection, CFormatState *state)
{
c_fmt_dialog_set_sensitive (state);
}
@@ -1105,7 +1107,7 @@ cb_can_select (G_GNUC_UNUSED GtkTreeSelection *selection,
}
static gboolean
-cb_c_format_dialog_range (SheetView *sv, GnmRange const *range, GString *str)
+cb_c_format_dialog_range (G_GNUC_UNUSED SheetView *sv, GnmRange const *range, GString *str)
{
g_string_append (str, range_as_string (range));
g_string_append (str, ", ");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]