[glib: 2/6] Fix signedness warning in glib/gcharset.c
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/6] Fix signedness warning in glib/gcharset.c
- Date: Wed, 13 Oct 2021 08:49:07 +0000 (UTC)
commit 74c3c5b75d5d3a942128429a88573f8d2df24649
Author: Emmanuel Fleury <emmanuel fleury gmail com>
Date: Fri May 14 10:51:46 2021 +0200
Fix signedness warning in glib/gcharset.c
glib/gcharset.c:380:35: warning: comparison of integer expressions of different signedness: 'long long
int' and 'long long unsigned int'
else if (modifier - dot < sizeof (buf))
^
glib/gcharset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gcharset.c b/glib/gcharset.c
index 9f91a9b48..48cb0ffae 100644
--- a/glib/gcharset.c
+++ b/glib/gcharset.c
@@ -377,7 +377,7 @@ g_get_console_charset (const char **charset)
modifier = strchr (dot, '@');
if (modifier == NULL)
raw = dot;
- else if (modifier - dot < sizeof (buf))
+ else if ((gsize) (modifier - dot) < sizeof (buf))
{
memcpy (buf, dot, modifier - dot);
buf[modifier - dot] = '\0';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]