Fixed all sign comparison warnings
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@684 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
badd2b7fd7
commit
7d8637f549
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
* src/notebook.c: Fixed GTK 2.6 workaround for DnD tab reordering so
|
* src/notebook.c: Fixed GTK 2.6 workaround for DnD tab reordering so
|
||||||
it works on the first attempt.
|
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@uvena.de>
|
2006-08-07 Enrico Tröger <enrico.troeger@uvena.de>
|
||||||
|
|||||||
@ -733,7 +733,7 @@ on_notebook1_switch_page (GtkNotebook *notebook,
|
|||||||
if (closing_all) return;
|
if (closing_all) return;
|
||||||
|
|
||||||
// guint == -1 seems useless, but it isn't!
|
// 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));
|
idx = document_find_by_sci(SCINTILLA(page));
|
||||||
else
|
else
|
||||||
idx = document_get_n_idx(page_num);
|
idx = document_get_n_idx(page_num);
|
||||||
@ -763,7 +763,7 @@ on_notebook1_switch_page_after (GtkNotebook *notebook,
|
|||||||
if (closing_all) return;
|
if (closing_all) return;
|
||||||
|
|
||||||
// guint == -1 seems useless, but it isn't!
|
// 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));
|
idx = document_find_by_sci(SCINTILLA(page));
|
||||||
else
|
else
|
||||||
idx = document_get_n_idx(page_num);
|
idx = document_get_n_idx(page_num);
|
||||||
@ -2605,7 +2605,7 @@ on_reload_as_activate (GtkMenuItem *menuitem,
|
|||||||
{
|
{
|
||||||
gint idx = document_get_cur_idx();
|
gint idx = document_get_cur_idx();
|
||||||
gchar *basename;
|
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 ||
|
if (idx < 0 || ! doc_list[idx].is_valid || doc_list[idx].file_name == NULL ||
|
||||||
i < 0 || i >= GEANY_ENCODINGS_MAX || encodings[i].charset == NULL)
|
i < 0 || i >= GEANY_ENCODINGS_MAX || encodings[i].charset == NULL)
|
||||||
|
|||||||
@ -684,7 +684,7 @@ void dialogs_create_recent_menu(void)
|
|||||||
{
|
{
|
||||||
GtkWidget *recent_menu = lookup_widget(app->window, "recent_files1_menu");
|
GtkWidget *recent_menu = lookup_widget(app->window, "recent_files1_menu");
|
||||||
GtkWidget *tmp;
|
GtkWidget *tmp;
|
||||||
gint i;
|
guint i;
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
|
|
||||||
if (g_queue_get_length(app->recent_queue) == 0)
|
if (g_queue_get_length(app->recent_queue) == 0)
|
||||||
|
|||||||
@ -192,7 +192,8 @@ void encodings_init(void)
|
|||||||
GCallback cb_func[2];
|
GCallback cb_func[2];
|
||||||
GSList *group = NULL;
|
GSList *group = NULL;
|
||||||
gchar *label;
|
gchar *label;
|
||||||
guint i, j, k, order, group_size;
|
gint order, group_size;
|
||||||
|
guint i, j, k;
|
||||||
|
|
||||||
init_encodings();
|
init_encodings();
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
#define GEANY_DEFAULT_TOOLS_BROWSER "mozilla"
|
#define GEANY_DEFAULT_TOOLS_BROWSER "mozilla"
|
||||||
#define GEANY_DEFAULT_TOOLS_PRINTCMD "lpr"
|
#define GEANY_DEFAULT_TOOLS_PRINTCMD "lpr"
|
||||||
#define GEANY_DEFAULT_TOOLS_GREP "grep"
|
#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_SYMBOL_LIST "Sans 9"
|
||||||
#define GEANY_DEFAULT_FONT_MSG_WINDOW "Sans 9"
|
#define GEANY_DEFAULT_FONT_MSG_WINDOW "Sans 9"
|
||||||
#define GEANY_DEFAULT_FONT_EDITOR "Monospace 10"
|
#define GEANY_DEFAULT_FONT_EDITOR "Monospace 10"
|
||||||
@ -164,7 +164,7 @@ typedef struct MyApp
|
|||||||
gint tab_pos_msgwin;
|
gint tab_pos_msgwin;
|
||||||
gint tab_pos_sidebar;
|
gint tab_pos_sidebar;
|
||||||
gint cur_idx; // currently only used by the build system (build_spawn_cmd)
|
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_type;
|
||||||
gint long_line_column;
|
gint long_line_column;
|
||||||
#ifdef HAVE_FIFO
|
#ifdef HAVE_FIFO
|
||||||
|
|||||||
@ -38,7 +38,7 @@ static gboolean global_latex_tags_loaded = FALSE;
|
|||||||
|
|
||||||
/* simple wrapper function to print file errors in DEBUG mode */
|
/* simple wrapper function to print file errors in DEBUG mode */
|
||||||
static void styleset_load_file(GKeyFile *key_file, const gchar *file, GKeyFileFlags flags,
|
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;
|
GError *error = NULL;
|
||||||
gboolean done = g_key_file_load_from_file(key_file, file, flags, &error);
|
gboolean done = g_key_file_load_from_file(key_file, file, flags, &error);
|
||||||
|
|||||||
@ -44,7 +44,8 @@ static void generate_filetype_extensions(const gchar *output_dir);
|
|||||||
|
|
||||||
void configuration_save()
|
void configuration_save()
|
||||||
{
|
{
|
||||||
gint i = 0, j = 0, idx, max;
|
guint i = 0, j = 0, max;
|
||||||
|
gint idx;
|
||||||
gboolean config_exists;
|
gboolean config_exists;
|
||||||
GKeyFile *config = g_key_file_new();
|
GKeyFile *config = g_key_file_new();
|
||||||
gchar *configfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "geany.conf", NULL);
|
gchar *configfile = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "geany.conf", NULL);
|
||||||
@ -240,7 +241,7 @@ gboolean configuration_load()
|
|||||||
app->toolbar_icon_size = utils_get_setting_integer(config, PACKAGE, "pref_toolbar_icon_size", tb_iconsize);
|
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->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_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_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);
|
app->long_line_column = utils_get_setting_integer(config, PACKAGE, "long_line_column", 72);
|
||||||
@ -477,7 +478,7 @@ void configuration_apply_settings()
|
|||||||
gint idx;
|
gint idx;
|
||||||
guint tabnum = 0;
|
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);
|
idx = document_get_n_idx(tabnum);
|
||||||
if (idx < 0) break;
|
if (idx < 0) break;
|
||||||
|
|||||||
@ -253,7 +253,7 @@ void treeviews_openfiles_update_all(void)
|
|||||||
gchar *shortname;
|
gchar *shortname;
|
||||||
|
|
||||||
gtk_list_store_clear(tv.store_openfiles);
|
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);
|
idx = document_get_n_idx(i);
|
||||||
if (! doc_list[idx].is_valid) continue;
|
if (! doc_list[idx].is_valid) continue;
|
||||||
|
|||||||
@ -2392,7 +2392,7 @@ gchar **utils_read_file_in_array(const gchar *filename)
|
|||||||
* Replaces \\, \r, \n, \t and \uXXX by their real counterparts */
|
* Replaces \\, \r, \n, \t and \uXXX by their real counterparts */
|
||||||
gboolean utils_str_replace_escape(gchar *string)
|
gboolean utils_str_replace_escape(gchar *string)
|
||||||
{
|
{
|
||||||
gint i, j;
|
gsize i, j;
|
||||||
guint unicodechar;
|
guint unicodechar;
|
||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user