[gnumeric] sparse: fix signedness problems.



commit b497c844b9f55a7d684632b339543288d6404869
Author: Morten Welinder <terra gnome org>
Date:   Sun Jul 18 16:09:28 2010 -0400

    sparse: fix signedness problems.

 ChangeLog                         |   31 ++++++++++++++++++-------------
 src/wbc-gtk-edit.c                |    6 +++---
 src/widgets/ChangeLog             |   10 +++++++---
 src/widgets/gnumeric-expr-entry.c |   11 ++++++-----
 4 files changed, 34 insertions(+), 24 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f14975f..9c6df9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,15 @@
+2010-07-18  Morten Welinder  <terra gnome org>
+
+	* src/wbc-gtk-edit.c (attrs_at_byte): Fix signedness problem.
+	(cb_entry_cursor_pos): Ditto.
+
 2010-07-18  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/clipboard.c (clipboard_paste_region): allow single merge to single
 	  merge pasting
 	* src/commands.c (CmdPasteCopy): add field
 	(cmd_paste_copy): allow single merge to single merge pasting
-	
+
 2010-07-16  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/sheet-control-gui.c (context_menu_handler): handle merging and
@@ -22,10 +27,10 @@
 	(workbook_view_new): ditto
 	(wb_view_get_property): ditto
 	* src/workbook-view.h (_WorkbookView): new field
-	
+
 2010-07-14  Andreas J. Guelzow <aguelzow pyrshep ca>
 
-	* schemas/gnumeric-general.schemas.in 
+	* schemas/gnumeric-general.schemas.in
 	(/schemas/apps/gnumeric/core/file/save/extension-check-disabled): new
 	* src/gnumeric-gconf.h: include above key
 	* src/gnumeric-gconf.c: ditto
@@ -135,7 +140,7 @@
 
 2010-07-07  Andreas J. Guelzow <aguelzow pyrshep ca>
 
-	* src/GNOME_Gnumeric-gtk.xml.in: add and move hyperlink and 
+	* src/GNOME_Gnumeric-gtk.xml.in: add and move hyperlink and
 	  comment items
 	* src/HILDON_Gnumeric-gtk.xml.in: ditto
 	* component/Gnumeric-embed.xml.in: ditto
@@ -144,7 +149,7 @@
 	* src/wbc-gtk-actions.c (cb_edit_delete_links): new
 	(permanent_actions): new Modify submenu of the Edit menu
 	(actions): add and move hyperlink and comment actions
-	* src/wbc-gtk.c (wbcg_menu_state_update): handle hyperlink and comment 
+	* src/wbc-gtk.c (wbcg_menu_state_update): handle hyperlink and comment
 	  items
 	* src/workbook-control.h: new MS_* flags
 
@@ -217,14 +222,14 @@
 
 2010-07-05  Andreas J. Guelzow <aguelzow pyrshep ca>
 
-	* src/sheet-control-gui.c (scg_drag_receive_same_process): one need to 
+	* src/sheet-control-gui.c (scg_drag_receive_same_process): one need to
 	  first duplicate the sheet before committing that change
 
 2010-07-04  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/commands.c (cmd_objects_move): simplify
 	* src/sheet-control-gui.h (scg_objects_drag_commit): add arguments
-	* src/sheet-control-gui.c (scg_objects_drag_commit): add arguments 
+	* src/sheet-control-gui.c (scg_objects_drag_commit): add arguments
 	  to return GOUndo items and change all callers
 	(scg_objects_drag_commit_get_undo_text): new (code from
 	  scg_objects_drag_commit)
@@ -242,7 +247,7 @@
 2010-07-04  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/sheet-control-gui.c (scg_objects_drag_commit): simplify slightly
-	(scg_drag_receive_same_process): pass the correct argument to 
+	(scg_drag_receive_same_process): pass the correct argument to
 	  scg_objects_drag_commit
 	* src/sheet-object.c (sheet_object_set_sheet): don't complain if the object
 	  is already set to this sheet.
@@ -293,8 +298,8 @@
 
 	* schemas/gnumeric-dialogs.schemas.in: new preferences for
 	  search and replace dialog
-	* src/gnumeric-gconf.c: add the items generated from the above 
-	  changes 
+	* src/gnumeric-gconf.c: add the items generated from the above
+	  changes
 	* src/gnumeric-gconf.h: ditto
 
 2010-06-28  Morten Welinder <terra gnome org>
@@ -317,7 +322,7 @@
 
 2010-06-28  Andreas J. Guelzow <aguelzow pyrshep ca>
 
-	* src/commands.c (CMD_AREA_SET_TEXT): deleted 
+	* src/commands.c (CMD_AREA_SET_TEXT): deleted
 	(cmd_area_set_text_*): deleted
 	(cmd_area_set_text): rewritten using GO_UNDO
 	* src/sheet.h (sheet_range_set_text_undo): new
@@ -354,12 +359,12 @@
 	* src/commands.c (cmd_cell_range_is_locked_effective): publish
 	(cmd_selection_is_locked_effective): publish
 	(cmd_area_set_array_expr): new
-	* src/wbc-gtk-edit.c (wbcg_edit_finish): check whether the range 
+	* src/wbc-gtk-edit.c (wbcg_edit_finish): check whether the range
 	  is locked; call cmd_area_set_array_expr when appropriate
 
 2010-06-25  Andreas J. Guelzow <aguelzow pyrshep ca>
 
-	* src/wbc-gtk-edit.c (wbcg_edit_finish): don't hide a varaible by 
+	* src/wbc-gtk-edit.c (wbcg_edit_finish): don't hide a varaible by
 	  using the same name.
 
 2010-06-25  Morten Welinder  <terra gnome org>
diff --git a/src/wbc-gtk-edit.c b/src/wbc-gtk-edit.c
index 9178eec..de91012 100644
--- a/src/wbc-gtk-edit.c
+++ b/src/wbc-gtk-edit.c
@@ -568,13 +568,13 @@ cb_entry_insert_text (GtkEditable *editable,
 }
 
 static GSList *
-attrs_at_byte (PangoAttrList *alist, guint bytepos)
+attrs_at_byte (PangoAttrList *alist, gint bytepos)
 {
 	PangoAttrIterator *iter = pango_attr_list_get_iterator (alist);
 	GSList *attrs = NULL;
 
 	do {
-		guint start, end;
+		gint start, end;
 		pango_attr_iterator_range (iter, &start, &end);
 		if (start <= bytepos && bytepos < end) {
 			attrs = pango_attr_iterator_get_attrs (iter);
@@ -608,7 +608,7 @@ set_cur_fmt (WBCGtk *wbcg, int target_pos_in_bytes)
 static void
 cb_entry_cursor_pos (WBCGtk *wbcg)
 {
-	guint start, end, target_pos_in_chars, target_pos_in_bytes;
+	gint start, end, target_pos_in_chars, target_pos_in_bytes;
 	GtkEditable *entry = GTK_EDITABLE (wbcg_get_entry (wbcg));
 	char const *str = gtk_entry_get_text (GTK_ENTRY (entry));
 	int edit_pos = gtk_editable_get_position (entry);
diff --git a/src/widgets/ChangeLog b/src/widgets/ChangeLog
index c0e1ec7..ae2332e 100644
--- a/src/widgets/ChangeLog
+++ b/src/widgets/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-18  Morten Welinder  <terra gnome org>
+
+	* gnumeric-expr-entry.c (cb_icon_clicked): Fix signedness problem.
+
 2010-07-16  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* gnumeric-expr-entry.c (gnm_expr_entry_find_range): permit
@@ -5,16 +9,16 @@
 
 2010-07-13  Andreas J. Guelzow <aguelzow pyrshep ca>
 
-	* gnumeric-expr-entry.h (gnm_expr_entry_find_range): return a 
+	* gnumeric-expr-entry.h (gnm_expr_entry_find_range): return a
 	  boolean indicating that a range selection would make sense
-	* gnumeric-expr-entry.c (gnm_expr_entry_find_range): return a 
+	* gnumeric-expr-entry.c (gnm_expr_entry_find_range): return a
 	  boolean indicating that a range selection would make sense
 	(yytokentype): use the token names from parser.c
 	(split_char_p): deleted
 	(gee_check_tooltip): change the token names
 	(gee_find_lexer_token): new
 	(gnm_expr_entry_find_range): rewrite using gnm_expr_lex_all
-	(gnm_expr_entry_can_rangesel): use the return value of 
+	(gnm_expr_entry_can_rangesel): use the return value of
 	  gnm_expr_entry_find_range
 
 2010-07-13  Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 782545c..bfe143c 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -234,7 +234,8 @@ cb_icon_clicked (GtkButton *icon,
 		g_assert (GTK_IS_WINDOW (toplevel));
 
 		if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (icon))) {
-			int n, width, height;
+			int width, height;
+			guint n;
 
 			/* roll-up request */
 
@@ -264,16 +265,16 @@ cb_icon_clicked (GtkButton *icon,
 					(G_OBJECT_GET_CLASS (old_entry_parent), &n);
 
 			if (container_props_pspec[0] != NULL) {
-				int i;
+				guint ui;
 
 				container_props = g_value_array_new (n);
 
-				for (i = 0; i < n; i++) {
+				for (ui = 0; ui < n; ui++) {
 					GValue value = { 0 };
-					g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (container_props_pspec[i]));
+					g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (container_props_pspec[ui]));
 
 					gtk_container_child_get_property (GTK_CONTAINER (old_entry_parent), GTK_WIDGET (entry),
-									  g_param_spec_get_name (container_props_pspec[i]),
+									  g_param_spec_get_name (container_props_pspec[ui]),
 									  &value);
 					g_value_array_append (container_props, &value);
 				}



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