summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2020-09-14 08:30:52 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2020-09-14 08:30:52 +0000
commit9bc61def1f815948ea28d92b59f506d3b2024ea0 (patch)
tree48da6f3599c2640253b1a55f342dbfe0c2cc1db7
parentb696dccb203bc73cdc497c1db84cc36aefa36d0a (diff)
parent16773d27027ab29fde2a50467174bbff60d8ac76 (diff)
downloadglib-9bc61def1f815948ea28d92b59f506d3b2024ea0.tar.gz
Merge branch 'fix_warnings' into 'master'
Fix various signedness warnings See merge request GNOME/glib!1645
-rw-r--r--glib/gspawn.c2
-rw-r--r--glib/gutils.c2
-rw-r--r--glib/tests/collate.c2
-rw-r--r--glib/tests/date.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/glib/gspawn.c b/glib/gspawn.c
index 80ef669f8..c37ac7c84 100644
--- a/glib/gspawn.c
+++ b/glib/gspawn.c
@@ -2244,7 +2244,7 @@ script_execute (const gchar *file,
gchar **envp)
{
/* Count the arguments. */
- int argc = 0;
+ gsize argc = 0;
while (argv[argc])
++argc;
diff --git a/glib/gutils.c b/glib/gutils.c
index c5aef47fa..aff3ed442 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -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
diff --git a/glib/tests/collate.c b/glib/tests/collate.c
index 017f247b1..bd9ea234f 100644
--- a/glib/tests/collate.c
+++ b/glib/tests/collate.c
@@ -271,7 +271,7 @@ int
main (int argc, char *argv[])
{
gchar *path;
- gint i;
+ guint i;
const gchar *locale;
CollateTest test[3];
diff --git a/glib/tests/date.c b/glib/tests/date.c
index 92f0a7f6e..e49ec3419 100644
--- a/glib/tests/date.c
+++ b/glib/tests/date.c
@@ -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[] = {