Merge branch 'fix_warnings' into 'master'

Fix various signedness warnings

See merge request GNOME/glib!1645
This commit is contained in:
Philip Withnall 2020-09-14 08:30:52 +00:00
commit 9bc61def1f
4 changed files with 4 additions and 4 deletions

View File

@ -2244,7 +2244,7 @@ script_execute (const gchar *file,
gchar **envp)
{
/* Count the arguments. */
int argc = 0;
gsize argc = 0;
while (argv[argc])
++argc;

View File

@ -995,7 +995,7 @@ g_get_host_name (void)
#ifdef _SC_HOST_NAME_MAX
max = sysconf (_SC_HOST_NAME_MAX);
if (max > 0 && max <= G_MAXSIZE - 1)
if (max > 0 && (gsize) max <= G_MAXSIZE - 1)
size = (gsize) max + 1;
else
#ifdef HOST_NAME_MAX

View File

@ -271,7 +271,7 @@ int
main (int argc, char *argv[])
{
gchar *path;
gint i;
guint i;
const gchar *locale;
CollateTest test[3];

View File

@ -737,7 +737,7 @@ int
main (int argc, char** argv)
{
gchar *path;
gint i;
gsize i;
/* Try to get all the leap year cases. */
int check_years[] = {