diff --git a/src/document.c b/src/document.c index 57e02167..f3fd9225 100644 --- a/src/document.c +++ b/src/document.c @@ -640,7 +640,7 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado /* check whether the size of the loaded data is equal to the size of the file in the filesystem */ //size = strlen(data); size = strlen(data); - if (size != st.st_size) + if (size != (gsize) st.st_size) { gchar *warn_msg = _("The file \"%s\" could not opened properly and probably was truncated. " "Be aware that saving it can cause data loss.\nThe file was set to read-only."); diff --git a/src/encodings.c b/src/encodings.c index f0ecfc99..5dcf464a 100644 --- a/src/encodings.c +++ b/src/encodings.c @@ -346,7 +346,7 @@ gchar *encodings_convert_to_utf8(const gchar *buffer, gsize size, gchar **used_e for (i = 0; i < GEANY_ENCODINGS_MAX; i++) { - if (i == encodings[GEANY_ENCODING_NONE].idx) continue; + if (i == (guint) encodings[GEANY_ENCODING_NONE].idx) continue; if (check_current) {