[gnumeric] Compilation: kill a pile of warnings.



commit 965fd5a362bf721b7bc051bfe2f8dbd95e364c67
Author: Morten Welinder <terra gnome org>
Date:   Tue Jan 1 14:09:15 2013 -0500

    Compilation: kill a pile of warnings.

 ChangeLog                           |   10 ++++++++++
 NEWS                                |    1 +
 plugins/glpk/ChangeLog              |    4 ++++
 plugins/glpk/glpk-write.c           |    2 --
 plugins/lpsolve/ChangeLog           |    5 +++++
 plugins/lpsolve/lpsolve-write.c     |    2 --
 plugins/qpro/ChangeLog              |    4 ++++
 plugins/qpro/qpro-read.c            |   18 ++++++++++--------
 src/application.c                   |    6 ++++--
 src/cellspan.c                      |    6 ++----
 src/dialogs/ChangeLog               |   10 ++++++++++
 src/dialogs/dialog-about.c          |    2 +-
 src/dialogs/dialog-plugin-manager.c |    2 --
 src/dialogs/dialog-scenarios.c      |    2 --
 src/dialogs/dialog-so-list.c        |    2 --
 src/dialogs/dialog-solver.c         |    4 +---
 src/gnm-pane.c                      |    2 --
 src/gnm-plugin.c                    |    5 -----
 src/wbc-gtk.c                       |    2 --
 19 files changed, 52 insertions(+), 37 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 979e644..6c6612d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-01-01  Morten Welinder  <terra gnome org>
+
+	* src/cellspan.c (cell_register_span, cell_calc_span): Remove
+	unused variable.
+	* src/gnm-pane.c (control_point_leave_notify): Ditto.
+	* src/gnm-plugin.c (plugin_service_solver_activate): Ditto.
+	* src/wbc-gtk.c (wbc_gtk_create_edit_area): Ditto.
+
+	* src/application.c (gnm_app_history_add): Kill warning.
+
 2012-12-31  Morten Welinder  <terra gnome org>
 
 	* src/sheet-style.c (sheet_style_resize): Double off-by-one.
diff --git a/NEWS b/NEWS
index ccc905b..3bc6448 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Morten:
 	* New utility: ssdiff.
 	* Remove disabled corba plugin.
 	* Fix off-by-ones in sheet resize.  [#690929]
+	* Start working on warnings from newer gcc.
   
 --------------------------------------------------------------------------
 Gnumeric 1.12.0
diff --git a/plugins/glpk/ChangeLog b/plugins/glpk/ChangeLog
index 9e16d0d..13fcea7 100644
--- a/plugins/glpk/ChangeLog
+++ b/plugins/glpk/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-01  Morten Welinder  <terra gnome org>
+
+	* glpk-write.c (glpk_create_program): Remove unused variable.
+
 2012-12-18  Morten Welinder <terra gnome org>
 
 	* Release 1.12.0
diff --git a/plugins/glpk/glpk-write.c b/plugins/glpk/glpk-write.c
index aabf46d..cc3230a 100644
--- a/plugins/glpk/glpk-write.c
+++ b/plugins/glpk/glpk-write.c
@@ -247,7 +247,6 @@ glpk_create_program (Sheet *sheet, GOIOContext *io_context,
  	for (l = sp->constraints; l; l = l->next) {
 		GnmSolverConstraint *c = l->data;
 		const char *op = NULL;
-		gboolean right_small = TRUE;
 		int i;
 		gnm_float cl, cr;
 		GnmCell *lhs, *rhs;
@@ -256,7 +255,6 @@ glpk_create_program (Sheet *sheet, GOIOContext *io_context,
 		switch (c->type) {
 		case GNM_SOLVER_LE:
 			op = "<=";
-			right_small = FALSE;
 			break;
 		case GNM_SOLVER_GE:
 			op = ">=";
diff --git a/plugins/lpsolve/ChangeLog b/plugins/lpsolve/ChangeLog
index 5e70d6b..f4ddb76 100644
--- a/plugins/lpsolve/ChangeLog
+++ b/plugins/lpsolve/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-01  Morten Welinder  <terra gnome org>
+
+	* lpsolve-write.c (lpsolve_create_program): Delete unused
+	variable.
+
 2012-12-18  Morten Welinder <terra gnome org>
 
 	* Release 1.12.0
diff --git a/plugins/lpsolve/lpsolve-write.c b/plugins/lpsolve/lpsolve-write.c
index 94c81db..d156f7f 100644
--- a/plugins/lpsolve/lpsolve-write.c
+++ b/plugins/lpsolve/lpsolve-write.c
@@ -238,7 +238,6 @@ lpsolve_create_program (Sheet *sheet, GOIOContext *io_context,
 		GnmSolverConstraint *c = l->data;
 		const char *op = NULL;
 		const char *type = NULL;
-		gboolean right_small = TRUE;
 		int i;
 		gnm_float cl, cr;
 		GnmCell *lhs, *rhs;
@@ -246,7 +245,6 @@ lpsolve_create_program (Sheet *sheet, GOIOContext *io_context,
 		switch (c->type) {
 		case GNM_SOLVER_LE:
 			op = "<=";
-			right_small = FALSE;
 			break;
 		case GNM_SOLVER_GE:
 			op = ">=";
diff --git a/plugins/qpro/ChangeLog b/plugins/qpro/ChangeLog
index 9394a56..3ce25f1 100644
--- a/plugins/qpro/ChangeLog
+++ b/plugins/qpro/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-01  Morten Welinder  <terra gnome org>
+
+	* qpro-read.c (qpro_parse_formula): Fix warnings for debug code.
+
 2012-12-18  Morten Welinder <terra gnome org>
 
 	* Release 1.12.0
diff --git a/plugins/qpro/qpro-read.c b/plugins/qpro/qpro-read.c
index 4e21229..86651ee 100644
--- a/plugins/qpro/qpro-read.c
+++ b/plugins/qpro/qpro-read.c
@@ -669,18 +669,20 @@ qpro_parse_formula (QProReadState *state, int col, int row,
 error:
 	{
 		GSList *tmp;
-		GnmParsePos pp;
-
-		pp.wb = state->wb;
-		pp.sheet = state->cur_sheet;
-		pp.eval.col = col;
-		pp.eval.row = row;
 
 		for (tmp = stack; tmp; tmp = tmp->next) {
 			GnmExpr *expr = tmp->data;
 #ifdef DEBUG_EXPR_STACK
-			char *p = gnm_expr_as_string (expr, &pp,
-						      gnm_conventions_default);
+			GnmParsePos pp;
+			char *p;
+
+			pp.wb = state->wb;
+			pp.sheet = state->cur_sheet;
+			pp.eval.col = col;
+			pp.eval.row = row;
+
+			p = gnm_expr_as_string (expr, &pp,
+						gnm_conventions_default);
 			g_printerr ("Expr: %s\n", p);
 			g_free (p);
 #endif
diff --git a/src/application.c b/src/application.c
index cce60db..5c625d0 100644
--- a/src/application.c
+++ b/src/application.c
@@ -660,7 +660,6 @@ void
 gnm_app_history_add (char const *uri, const char *mimetype)
 {
 	GtkRecentData rd;
-	gboolean retval;
 
 	memset (&rd, 0, sizeof (rd));
 
@@ -676,7 +675,10 @@ gnm_app_history_add (char const *uri, const char *mimetype)
 	rd.groups = NULL;
 	rd.is_private = FALSE;
 
-	retval = gtk_recent_manager_add_full (app->recent, uri, &rd);
+	if (!gtk_recent_manager_add_full (app->recent, uri, &rd)) {
+		/* Now what?  */
+		g_printerr ("Warning: failed to update recent document.\n");
+	}
 
 	g_free (rd.mime_type);
 	g_free (rd.app_name);
diff --git a/src/cellspan.c b/src/cellspan.c
index 9bac0e0..0a472c6 100644
--- a/src/cellspan.c
+++ b/src/cellspan.c
@@ -73,12 +73,11 @@ void
 cell_register_span (GnmCell const *cell, int left, int right)
 {
 	ColRowInfo *ri;
-	int col, row, i;
+	int row, i;
 
 	g_return_if_fail (cell != NULL);
 	g_return_if_fail (left <= right);
 
-	col = cell->pos.col;
 	row = cell->pos.row;
 	ri = sheet_row_get (cell->base.sheet, row);
 
@@ -228,7 +227,7 @@ cell_calc_span (GnmCell const *cell, int *col1, int *col2)
 {
 	Sheet *sheet;
 	int h_align, v_align, left, max_col, min_col;
-	int row, pos;
+	int pos;
 	int cell_width_pixel, indented_w;
 	GnmStyle const *style;
 	ColRowInfo const *ci;
@@ -258,7 +257,6 @@ cell_calc_span (GnmCell const *cell, int *col1, int *col2)
 	}
 
 	v_align = gnm_style_get_align_v (style);
-	row   = cell->pos.row;
 	indented_w = cell_width_pixel = gnm_cell_rendered_width (cell);
 	if (h_align == GNM_HALIGN_LEFT || h_align == GNM_HALIGN_RIGHT) {
 		GnmRenderedValue *rv = gnm_cell_get_rendered_value (cell);
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index bfca948..4a5cd45 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,13 @@
+2013-01-01  Morten Welinder  <terra gnome org>
+
+	* dialog-about.c (dialog_about): Update copyright year.
+
+	* dialog-plugin-manager.c (dialog_plugin_manager): Remove unused
+	variable.
+	* dialog-scenarios.c (scenarios_show_clicked_cb): Ditto.
+	* dialog-so-list.c (so_list_init): Ditto.
+	* dialog-solver.c (extract_settings): Ditto.
+
 2012-12-18  Morten Welinder <terra gnome org>
 
 	* Release 1.12.0
diff --git a/src/dialogs/dialog-about.c b/src/dialogs/dialog-about.c
index c4d12e2..58bdfc1 100644
--- a/src/dialogs/dialog-about.c
+++ b/src/dialogs/dialog-about.c
@@ -569,7 +569,7 @@ dialog_about (WBCGtk *wbcg)
 			  "website", "http://www.gnumeric.org/";,
 			  "website-label", _("Visit the Gnumeric website"),
 			  "logo-icon-name", "gnumeric",
-			  "copyright", _("Copyright \xc2\xa9 1998-2012"),
+			  "copyright", _("Copyright \xc2\xa9 1998-2013"),
 			  "comments", _("Free, Fast, Accurate - Pick Any Three!"),
 			  NULL);
 	state->dialog = w;
diff --git a/src/dialogs/dialog-plugin-manager.c b/src/dialogs/dialog-plugin-manager.c
index 8081601..be56eaa 100644
--- a/src/dialogs/dialog-plugin-manager.c
+++ b/src/dialogs/dialog-plugin-manager.c
@@ -644,7 +644,6 @@ dialog_plugin_manager (WBCGtk *wbcg)
 	GtkBuilder *gui;
 	GtkWidget *scrolled;
 	GtkWidget *scrolled_directories;
-	GtkWidget *hbox;
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *rend;
 	GtkWidget *image = NULL;
@@ -735,7 +734,6 @@ dialog_plugin_manager (WBCGtk *wbcg)
 
 	/* Set-up directories page */
 
-	hbox = go_gtk_builder_get_widget (gui, "directory-box");
 	pm_gui->model_directories = gtk_list_store_new (DIR_NUM_COLMNS, G_TYPE_STRING,
 							G_TYPE_BOOLEAN);
 	pm_gui->list_directories = GTK_TREE_VIEW (
diff --git a/src/dialogs/dialog-scenarios.c b/src/dialogs/dialog-scenarios.c
index 0a95629..c688901 100644
--- a/src/dialogs/dialog-scenarios.c
+++ b/src/dialogs/dialog-scenarios.c
@@ -626,7 +626,6 @@ static void
 scenarios_show_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
 			   ScenariosState *state)
 {
-	WorkbookControl         *wbc;
 	GtkTreeSelection        *selection;
 	GtkTreeIter             iter;
 	GtkTreeModel            *model;
@@ -643,7 +642,6 @@ scenarios_show_clicked_cb (G_GNUC_UNUSED GtkWidget *button,
 
 	restore_old_values (state);
 
-	wbc = WORKBOOK_CONTROL (state->base.wbcg);
 	state->current = gnm_sheet_scenario_find (state->base.sheet, value);
 	state->undo = gnm_scenario_apply (state->current);
 }
diff --git a/src/dialogs/dialog-so-list.c b/src/dialogs/dialog-so-list.c
index 85c5701..410c640 100644
--- a/src/dialogs/dialog-so-list.c
+++ b/src/dialogs/dialog-so-list.c
@@ -100,7 +100,6 @@ cb_so_list_response (GtkWidget *dialog, gint response_id, GnmDialogSOList *state
 static gboolean
 so_list_init (GnmDialogSOList *state, WBCGtk *wbcg, SheetObject *so)
 {
-	GtkTable *table;
 	GnmExprTop const *texpr;
 	GtkBuilder *gui;
 
@@ -111,7 +110,6 @@ so_list_init (GnmDialogSOList *state, WBCGtk *wbcg, SheetObject *so)
 	state->wbcg   = wbcg;
 	state->so     = so;
 	state->dialog = go_gtk_builder_get_widget (gui, "SOList");
-	table = GTK_TABLE (go_gtk_builder_get_widget (gui, "table"));
 
 	texpr = sheet_widget_list_base_get_content_link (so);
 	state->content_entry = init_entry (state, gui, 1, 4, texpr);
diff --git a/src/dialogs/dialog-solver.c b/src/dialogs/dialog-solver.c
index c4ea7a8..ead2a45 100644
--- a/src/dialogs/dialog-solver.c
+++ b/src/dialogs/dialog-solver.c
@@ -6,7 +6,7 @@
  *  Jukka-Pekka Iivonen <iivonen iki fi>
  *
  * (C) Copyright 2000, 2002 by Jukka-Pekka Iivonen <iivonen iki fi>
- * (C) Copyright 2009 Morten Welinder (terra gnome org)
+ * (C) Copyright 2009-2013 Morten Welinder (terra gnome org)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -386,7 +386,6 @@ extract_settings (SolverState *state)
 {
 	GnmSolverParameters *param = state->sheet->solver_parameters;
 	GtkTreeIter iter;
-	GnmCell *target_cell;
 	GnmValue *target_range;
 	GnmValue *input_range;
 	GnmSolverFactory *factory = NULL;
@@ -402,7 +401,6 @@ extract_settings (SolverState *state)
 				     target_range
 				     ? &target_range->v_range.cell.a
 				     : NULL);
-	target_cell = gnm_solver_param_get_target_cell (param);
 
 	param->problem_type =
 		gnm_gui_group_value (state->gui, problem_type_group);
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 2397eb7..1d2cf32 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -2744,11 +2744,9 @@ control_point_leave_notify (GocItem *item, G_GNUC_UNUSED double x, G_GNUC_UNUSED
 	GnmPane *pane = GNM_PANE (item->canvas);
 	SheetControlGUI *scg = pane->simple.scg;
 	int idx;
-	SheetObject *so;
 
 	control_point_set_cursor (scg, item);
 
-	so  = g_object_get_data (G_OBJECT (item), "so");
 	idx = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "index"));
 	if (idx != 8) {
 		GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (item));
diff --git a/src/gnm-plugin.c b/src/gnm-plugin.c
index 7fe82b0..fe70716 100644
--- a/src/gnm-plugin.c
+++ b/src/gnm-plugin.c
@@ -639,14 +639,9 @@ static void
 plugin_service_solver_activate (GOPluginService *service, GOErrorInfo **ret_error)
 {
 	PluginServiceSolver *ssol = GNM_PLUGIN_SERVICE_SOLVER (service);
-	char const *textdomain;
 
 	GO_INIT_RET_ERROR_INFO (ret_error);
-
-	textdomain = go_plugin_get_textdomain (service->plugin);
-
 	gnm_solver_db_register (ssol->factory);
-
 	service->is_active = TRUE;
 }
 
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 122ed25..5e39b53 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -2660,13 +2660,11 @@ wbc_gtk_create_edit_area (WBCGtk *wbcg)
 	GtkToolItem *item;
 	GtkEntry *entry;
 	int len;
-	GtkToolbar *tb;
 	GtkWidget *debug_button;
 
 	wbc_gtk_init_editline (wbcg);
 	entry = wbcg_get_entry (wbcg);
 
-	tb = GET_GUI_ITEM ("toolbar");
 	/* Set a reasonable width for the selection box. */
 	len = go_pango_measure_string (
 		gtk_widget_get_pango_context (GTK_WIDGET (wbcg_toplevel (wbcg))),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]