From 33bfae70acf76dcca6cfdfe21ca4c0236c40e63e Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Thu, 10 Sep 2020 18:05:40 +0200 Subject: [PATCH] Fix signedness problem in glib/gutils.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit glib/gutils.c:998:26: error: comparison of integer expressions of different signedness: ‘glong’ {aka ‘long int’} and ‘long unsigned int’ 998 | if (max > 0 && max <= G_MAXSIZE - 1) | ^~ --- glib/gutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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