gnome-terminal r3176 - trunk/src



Author: chpe
Date: Fri Oct 17 21:52:52 2008
New Revision: 3176
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3176&view=rev

Log:
Fix signed/unsigned compare warnings.

Modified:
   trunk/src/eggdesktopfile.c
   trunk/src/eggsmclient-xsmp.c
   trunk/src/profile-editor.c
   trunk/src/terminal-accels.c
   trunk/src/terminal-profile.c
   trunk/src/terminal-profile.h

Modified: trunk/src/eggdesktopfile.c
==============================================================================
--- trunk/src/eggdesktopfile.c	(original)
+++ trunk/src/eggdesktopfile.c	Fri Oct 17 21:52:52 2008
@@ -939,7 +939,7 @@
 static GPtrArray *
 array_putenv (GPtrArray *env, char *variable)
 {
-  int i, keylen;
+  guint i, keylen;
 
   if (!env)
     {

Modified: trunk/src/eggsmclient-xsmp.c
==============================================================================
--- trunk/src/eggsmclient-xsmp.c	(original)
+++ trunk/src/eggsmclient-xsmp.c	Fri Oct 17 21:52:52 2008
@@ -863,7 +863,7 @@
     {
       GKeyFile *merged_file;
       char *exec;
-      int i;
+      guint i;
 
       merged_file = g_key_file_new ();
       merge_keyfiles (merged_file, egg_desktop_file_get_key_file (desktop_file));
@@ -1114,7 +1114,7 @@
   GPtrArray *props;
   SmProp *prop;
   va_list ap;
-  int i;
+  guint i;
 
   props = g_ptr_array_new ();
 
@@ -1207,7 +1207,7 @@
   SmProp *prop;
   SmPropValue pv;
   GArray *vals;
-  int i;
+  guint i;
 
   prop = g_new (SmProp, 1);
   prop->name = (char *)name;

Modified: trunk/src/profile-editor.c
==============================================================================
--- trunk/src/profile-editor.c	(original)
+++ trunk/src/profile-editor.c	Fri Oct 17 21:52:52 2008
@@ -280,7 +280,7 @@
                                GParamSpec *pspec,
                                TerminalProfile *profile)
 {
-  int i;
+  guint i;
   
   i = gtk_combo_box_get_active (GTK_COMBO_BOX (combo));
   
@@ -305,7 +305,7 @@
                                        GtkComboBox *combo)
 {
   const GdkColor *fg, *bg;
-  int i;
+  guint i;
 
   fg = terminal_profile_get_property_boxed (profile, TERMINAL_PROFILE_FOREGROUND_COLOR);
   bg = terminal_profile_get_property_boxed (profile, TERMINAL_PROFILE_BACKGROUND_COLOR);
@@ -367,10 +367,10 @@
 {
   GtkWidget *editor;
   GdkColor color;
-  int i;
+  guint i;
 
   gtk_color_button_get_color (button, &color);
-  i = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "palette-entry-index"));
+  i = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (button), "palette-entry-index"));
 
   editor = gtk_widget_get_toplevel (GTK_WIDGET (button));
   g_signal_handlers_block_by_func (profile, G_CALLBACK (profile_palette_notify_colorpickers_cb), editor);
@@ -725,10 +725,10 @@
       char name[32];
       char *text;
 
-      g_snprintf (name, sizeof (name), "palette-colorpicker-%d", i + 1);
+      g_snprintf (name, sizeof (name), "palette-colorpicker-%u", i + 1);
       w = (GtkWidget *) gtk_builder_get_object  (builder, name);
 
-      g_object_set_data (G_OBJECT (w), "palette-entry-index", GINT_TO_POINTER (i));
+      g_object_set_data (G_OBJECT (w), "palette-entry-index", GUINT_TO_POINTER (i));
 
       text = g_strdup_printf (_("Choose Palette Color %d"), i + 1);
       gtk_color_button_set_title (GTK_COLOR_BUTTON (w), text);

Modified: trunk/src/terminal-accels.c
==============================================================================
--- trunk/src/terminal-accels.c	(original)
+++ trunk/src/terminal-accels.c	Fri Oct 17 21:52:52 2008
@@ -116,7 +116,7 @@
 typedef struct
 {
   KeyEntry *key_entry;
-  gint n_elements;
+  guint n_elements;
   gchar *user_visible_name;
 } KeyEntryList;
 
@@ -300,7 +300,7 @@
 terminal_accels_init (void)
 {
   GConfClient *conf;
-  int i, j;
+  guint i, j;
 
   conf = gconf_client_get_default ();
   
@@ -864,7 +864,7 @@
   GtkTreeViewColumn *column;
   GtkCellRenderer *cell_renderer;
   GtkTreeStore *tree;
-  int i;
+  guint i;
 
   if (edit_keys_dialog != NULL)
     goto done;
@@ -920,7 +920,7 @@
   for (i = 0; i < G_N_ELEMENTS (all_entries); ++i)
     {
       GtkTreeIter parent_iter;
-      int j;
+      guint j;
 
       gtk_tree_store_append (tree, &parent_iter, NULL);
       gtk_tree_store_set (tree, &parent_iter,

Modified: trunk/src/terminal-profile.c
==============================================================================
--- trunk/src/terminal-profile.c	(original)
+++ trunk/src/terminal-profile.c	Fri Oct 17 21:52:52 2008
@@ -1625,7 +1625,7 @@
 
 gboolean
 terminal_profile_modify_palette_entry (TerminalProfile *profile,
-                                       int              i,
+                                       guint            i,
                                        const GdkColor  *color)
 {
   TerminalProfilePrivate *priv = profile->priv;
@@ -1634,10 +1634,8 @@
   GdkColor *old_color;
 
   array = g_value_get_boxed (g_value_array_get_nth (priv->properties, PROP_PALETTE));
-  if (!array)
-    return FALSE;
-
-  if (i < 0 || i >= array->n_values)
+  if (!array ||
+      i >= array->n_values)
     return FALSE;
 
   value = g_value_array_get_nth (array, i);

Modified: trunk/src/terminal-profile.h
==============================================================================
--- trunk/src/terminal-profile.h	(original)
+++ trunk/src/terminal-profile.h	Fri Oct 17 21:52:52 2008
@@ -178,7 +178,7 @@
                                                            guint n);
 
 gboolean          terminal_profile_modify_palette_entry   (TerminalProfile *profile,
-                                                           int              i,
+                                                           guint            i,
                                                            const GdkColor  *color);
 
 G_END_DECLS



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