Commit 135cdd43 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor
Browse files

Some cleanups of signedness warnings

Sat Mar 14 13:26:09 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness
          warnings

	* gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1
parent 6e7f4a99
Sat Mar 14 13:26:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness
warnings
* gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1
1998-03-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the
......
Sat Mar 14 13:26:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness
warnings
* gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1
1998-03-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the
......
Sat Mar 14 13:26:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness
warnings
* gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1
1998-03-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the
......
Sat Mar 14 13:26:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness
warnings
* gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1
1998-03-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the
......
Sat Mar 14 13:26:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness
warnings
* gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1
1998-03-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the
......
Sat Mar 14 13:26:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness
warnings
* gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1
1998-03-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the
......
Sat Mar 14 13:26:09 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c: Some cleanups of signedness
warnings
* gtk/gtkhandlebox.h: Changed gint ... : 1 to guint ... : 1
1998-03-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtktoolbar.c (gtk_toolbar_insert_element): Moved the
......
......@@ -1586,12 +1586,8 @@ gtk_move_backward_character (GtkEntry *entry)
/* this routine is correct only if string is state-independent-encoded */
if (0 < editable->current_pos)
{
editable->current_pos = move_backward_character (entry->text,
editable->current_pos);
if (editable->current_pos < 0)
editable->current_pos = 0;
}
editable->current_pos = move_backward_character (entry->text,
editable->current_pos);
}
static void
......
......@@ -50,9 +50,9 @@ struct _GtkHandleBox
GdkWindow *steady_window; /* the window that stays in the parent container */
GtkWidget *float_window;
GtkRequisition real_requisition;
gint is_being_dragged : 1;
gint is_onroot : 1;
gint overlap_attaches : 1;
guint is_being_dragged : 1;
guint is_onroot : 1;
guint overlap_attaches : 1;
GdkCursor *fleur_cursor;
gint dragoff_x, dragoff_y; /* start drag position (wrt widget->window) */
......
......@@ -609,7 +609,7 @@ gtk_text_set_point (GtkText *text,
{
g_return_if_fail (text != NULL);
g_return_if_fail (GTK_IS_TEXT (text));
g_return_if_fail (index >= 0 && index <= TEXT_LENGTH (text));
g_return_if_fail (index <= TEXT_LENGTH (text));
text->point = find_mark (text, index);
}
......@@ -664,13 +664,13 @@ gtk_text_insert (GtkText *text,
const char *chars,
gint nchars)
{
gint i;
GtkEditable *editable = GTK_EDITABLE (text);
gboolean frozen = FALSE;
gint new_line_count = 1;
guint old_height = 0;
guint length;
guint i;
g_return_if_fail (text != NULL);
g_return_if_fail (GTK_IS_TEXT (text));
......@@ -839,7 +839,9 @@ gtk_text_get_chars (GtkEditable *editable,
if (end_pos < 0)
end_pos = TEXT_LENGTH (text);
if ((end_pos > TEXT_LENGTH (text)) || (end_pos < start_pos))
if ((start_pos < 0) ||
(end_pos > TEXT_LENGTH (text)) ||
(end_pos < start_pos))
return NULL;
nchars = end_pos - start_pos;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment