diff --git a/gio/gcontenttype-win32.c b/gio/gcontenttype-win32.c index 2f07fa36e..726759d8c 100644 --- a/gio/gcontenttype-win32.c +++ b/gio/gcontenttype-win32.c @@ -59,7 +59,7 @@ get_registry_classes_key (const char *subdir, if (key_type == REG_EXPAND_SZ) { wchar_t dummy[1]; - int len = ExpandEnvironmentStringsW (wc_temp, dummy, 1); + DWORD len = ExpandEnvironmentStringsW (wc_temp, dummy, 1); if (len > 0) { wchar_t *wc_temp_expanded = g_new (wchar_t, len); diff --git a/gio/ginputstream.c b/gio/ginputstream.c index a40c7d9c4..8fda2693c 100644 --- a/gio/ginputstream.c +++ b/gio/ginputstream.c @@ -429,8 +429,8 @@ g_input_stream_real_skip (GInputStream *stream, end = g_seekable_tell (seekable); g_assert (start >= 0); g_assert (end >= start); - if ((guint64) start > (G_MAXSIZE - count) || - (start + count) > (guint64) end) + if (start > (goffset) (G_MAXOFFSET - count) || + (goffset) (start + count) > end) { stream->priv->pending = TRUE; return end - start; diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c index 3dc35d99a..38719c4c0 100644 --- a/gio/gwin32appinfo.c +++ b/gio/gwin32appinfo.c @@ -3359,7 +3359,7 @@ uwp_package_cb (gpointer user_data, GPtrArray *supported_extgroups, GPtrArray *supported_protocols) { - gint i, i_verb, i_ext; + guint i, i_verb, i_ext; gint extensions_considered; GWin32AppInfoApplication *app; gchar *app_user_model_id_u8; @@ -3459,7 +3459,7 @@ uwp_package_cb (gpointer user_data, */ while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &ext)) { - gint i_hverb; + guint i_hverb; if (!ext) continue; @@ -3537,7 +3537,7 @@ uwp_package_cb (gpointer user_data, while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &url)) { - gint i_hverb; + guint i_hverb; if (!url) continue; @@ -4788,7 +4788,7 @@ g_win32_app_info_launch_internal (GWin32AppInfo *info, if (apppath) { gchar **p; - gint p_index; + gsize p_index; for (p = envp, p_index = 0; p[0]; p++, p_index++) if ((p[0][0] == 'p' || p[0][0] == 'P') && diff --git a/gio/gwin32packageparser.c b/gio/gwin32packageparser.c index ee05bb1dd..58b99947c 100755 --- a/gio/gwin32packageparser.c +++ b/gio/gwin32packageparser.c @@ -96,7 +96,7 @@ static BOOL WIN32_FROM_HRESULT (HRESULT hresult, DWORD *win32_error_code) { - if ((hresult & 0xFFFF0000) == MAKE_HRESULT (SEVERITY_ERROR, FACILITY_WIN32, 0) || + if ((hresult & (HRESULT) 0xFFFF0000) == MAKE_HRESULT (SEVERITY_ERROR, FACILITY_WIN32, 0) || hresult == S_OK) { *win32_error_code = HRESULT_CODE (hresult); @@ -815,4 +815,4 @@ xml_parser_iteration (struct _xml_sax_state *sax, } return TRUE; -} \ No newline at end of file +} diff --git a/gio/tests/gio-du.c b/gio/tests/gio-du.c index 58d1797d2..253a21f70 100644 --- a/gio/tests/gio-du.c +++ b/gio/tests/gio-du.c @@ -79,7 +79,6 @@ main (int argc, char **argv) #ifdef G_OS_WIN32 argv = g_win32_get_command_line (); - argc = g_strv_length (argv); #endif setlocale (LC_ALL, ""); diff --git a/glib/gutf8.c b/glib/gutf8.c index 7d053540d..52e593d93 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -574,7 +574,7 @@ static inline gunichar g_utf8_get_char_extended (const gchar *p, gssize max_len) { - guint i, len; + gsize i, len; gunichar min_code; gunichar wc = (guchar) *p; const gunichar partial_sequence = (gunichar) -2; @@ -623,9 +623,9 @@ g_utf8_get_char_extended (const gchar *p, return malformed_sequence; } - if (G_UNLIKELY (max_len >= 0 && len > max_len)) + if (G_UNLIKELY (max_len >= 0 && len > (gsize) max_len)) { - for (i = 1; i < max_len; i++) + for (i = 1; i < (gsize) max_len; i++) { if ((((guchar *)p)[i] & 0xc0) != 0x80) return malformed_sequence;