SF.net SVN: geany: [684] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Aug 8 13:02:03 UTC 2006


Revision: 684
Author:   ntrel
Date:     2006-08-08 06:01:50 -0700 (Tue, 08 Aug 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=684&view=rev

Log Message:
-----------
Fixed all sign comparison warnings

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c
    trunk/src/dialogs.c
    trunk/src/encodings.c
    trunk/src/geany.h
    trunk/src/highlighting.c
    trunk/src/keyfile.c
    trunk/src/treeviews.c
    trunk/src/utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/ChangeLog	2006-08-08 13:01:50 UTC (rev 684)
@@ -2,6 +2,9 @@
 
  * src/notebook.c: Fixed GTK 2.6 workaround for DnD tab reordering so
                    it works on the first attempt.
+ * src/utils.c, src/highlighting.c, src/geany.h, src/treeviews.c,
+   src/callbacks.c, src/keyfile.c, src/encodings.c, src/dialogs.c:
+   Fixed all sign comparison warnings.
 
 
 2006-08-07  Enrico Tröger  <enrico.troeger at uvena.de>

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/src/callbacks.c	2006-08-08 13:01:50 UTC (rev 684)
@@ -733,7 +733,7 @@
 	if (closing_all) return;
 
 	// guint == -1 seems useless, but it isn't!
-	if (page_num == -1 && page != NULL)
+	if (page_num == (guint) -1 && page != NULL)
 		idx = document_find_by_sci(SCINTILLA(page));
 	else
 		idx = document_get_n_idx(page_num);
@@ -763,7 +763,7 @@
 	if (closing_all) return;
 
 	// guint == -1 seems useless, but it isn't!
-	if (page_num == -1 && page != NULL)
+	if (page_num == (guint) -1 && page != NULL)
 		idx = document_find_by_sci(SCINTILLA(page));
 	else
 		idx = document_get_n_idx(page_num);
@@ -2605,7 +2605,7 @@
 {
 	gint idx = document_get_cur_idx();
 	gchar *basename;
-	guint i = GPOINTER_TO_INT(user_data);
+	gint i = GPOINTER_TO_INT(user_data);
 
 	if (idx < 0 || ! doc_list[idx].is_valid || doc_list[idx].file_name == NULL ||
 		i < 0 || i >= GEANY_ENCODINGS_MAX || encodings[i].charset == NULL)

Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/src/dialogs.c	2006-08-08 13:01:50 UTC (rev 684)
@@ -684,7 +684,7 @@
 {
 	GtkWidget *recent_menu = lookup_widget(app->window, "recent_files1_menu");
 	GtkWidget *tmp;
-	gint i;
+	guint i;
 	gchar *filename;
 
 	if (g_queue_get_length(app->recent_queue) == 0)

Modified: trunk/src/encodings.c
===================================================================
--- trunk/src/encodings.c	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/src/encodings.c	2006-08-08 13:01:50 UTC (rev 684)
@@ -192,7 +192,8 @@
 	GCallback cb_func[2];
 	GSList *group = NULL;
 	gchar *label;
-	guint i, j, k, order, group_size;
+	gint order, group_size;
+	guint i, j, k;
 
 	init_encodings();
 

Modified: trunk/src/geany.h
===================================================================
--- trunk/src/geany.h	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/src/geany.h	2006-08-08 13:01:50 UTC (rev 684)
@@ -69,7 +69,7 @@
 #define GEANY_DEFAULT_TOOLS_BROWSER		"mozilla"
 #define GEANY_DEFAULT_TOOLS_PRINTCMD	"lpr"
 #define GEANY_DEFAULT_TOOLS_GREP		"grep"
-#define GEANY_DEFAULT_MRU_LENGHTH		10
+#define GEANY_DEFAULT_MRU_LENGTH		10
 #define GEANY_DEFAULT_FONT_SYMBOL_LIST	"Sans 9"
 #define GEANY_DEFAULT_FONT_MSG_WINDOW	"Sans 9"
 #define GEANY_DEFAULT_FONT_EDITOR		"Monospace 10"
@@ -164,7 +164,7 @@
 	gint				 tab_pos_msgwin;
 	gint				 tab_pos_sidebar;
 	gint				 cur_idx;	// currently only used by the build system (build_spawn_cmd)
-	gint				 mru_length;
+	guint				 mru_length;
 	gint				 long_line_type;
 	gint				 long_line_column;
 #ifdef HAVE_FIFO

Modified: trunk/src/highlighting.c
===================================================================
--- trunk/src/highlighting.c	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/src/highlighting.c	2006-08-08 13:01:50 UTC (rev 684)
@@ -38,7 +38,7 @@
 
 /* simple wrapper function to print file errors in DEBUG mode */
 static void styleset_load_file(GKeyFile *key_file, const gchar *file, GKeyFileFlags flags,
-								GError **just_for_compatibility)
+								G_GNUC_UNUSED GError **just_for_compatibility)
 {
 	GError *error = NULL;
 	gboolean done = g_key_file_load_from_file(key_file, file, flags, &error);

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/src/keyfile.c	2006-08-08 13:01:50 UTC (rev 684)
@@ -44,7 +44,8 @@
 
 void configuration_save()
 {
-	gint i = 0, j = 0, idx, max;
+	guint i = 0, j = 0, max;
+	gint idx;
 	gboolean config_exists;
 	GKeyFile *config = g_key_file_new();
 	gchar *configfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "geany.conf", NULL);
@@ -240,7 +241,7 @@
 		app->toolbar_icon_size = utils_get_setting_integer(config, PACKAGE, "pref_toolbar_icon_size", tb_iconsize);
 	}
 	app->beep_on_errors = utils_get_setting_boolean(config, PACKAGE, "beep_on_errors", TRUE);
-	app->mru_length = utils_get_setting_integer(config, PACKAGE, "mru_length", GEANY_DEFAULT_MRU_LENGHTH);
+	app->mru_length = utils_get_setting_integer(config, PACKAGE, "mru_length", GEANY_DEFAULT_MRU_LENGTH);
 	app->long_line_type = utils_get_setting_integer(config, PACKAGE, "long_line_type", 0);
 	app->long_line_color = utils_get_setting_string(config, PACKAGE, "long_line_color", "#C2EBC2");
 	app->long_line_column = utils_get_setting_integer(config, PACKAGE, "long_line_column", 72);
@@ -477,7 +478,7 @@
 		gint idx;
 		guint tabnum = 0;
 
-		while (tabnum < gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)))
+		while (tabnum < (guint) gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)))
 		{
 			idx = document_get_n_idx(tabnum);
 			if (idx < 0) break;

Modified: trunk/src/treeviews.c
===================================================================
--- trunk/src/treeviews.c	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/src/treeviews.c	2006-08-08 13:01:50 UTC (rev 684)
@@ -253,7 +253,7 @@
 	gchar *shortname;
 
 	gtk_list_store_clear(tv.store_openfiles);
-	for (i = 0; i < gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)); i++)
+	for (i = 0; i < (guint) gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)); i++)
 	{
 		idx = document_get_n_idx(i);
 		if (! doc_list[idx].is_valid) continue;

Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c	2006-08-08 10:52:36 UTC (rev 683)
+++ trunk/src/utils.c	2006-08-08 13:01:50 UTC (rev 684)
@@ -2392,7 +2392,7 @@
  * Replaces \\, \r, \n, \t and \uXXX by their real counterparts */
 gboolean utils_str_replace_escape(gchar *string)
 {
-	gint i, j;
+	gsize i, j;
 	guint unicodechar;
 
 	j = 0;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Commits mailing list