mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Fix signedness warning in gio/gsimpleproxyresolver.c:ignore_host()
gio/gsimpleproxyresolver.c: In function ‘ignore_host’: gio/gsimpleproxyresolver.c:271:18: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} 271 | for (i = 0; i < priv->ignore_ips->len; i++) | ^
This commit is contained in:
parent
a39312b14f
commit
8b4c6fcc00
@ -50,7 +50,7 @@
|
||||
|
||||
typedef struct {
|
||||
gchar *name;
|
||||
gint length;
|
||||
gsize length;
|
||||
gushort port;
|
||||
} GSimpleProxyResolverDomain;
|
||||
|
||||
@ -259,7 +259,8 @@ ignore_host (GSimpleProxyResolver *resolver,
|
||||
GSimpleProxyResolverPrivate *priv = resolver->priv;
|
||||
gchar *ascii_host = NULL;
|
||||
gboolean ignore = FALSE;
|
||||
gint i, length, offset;
|
||||
gsize offset, length;
|
||||
guint i;
|
||||
|
||||
if (priv->ignore_ips)
|
||||
{
|
||||
@ -297,6 +298,9 @@ ignore_host (GSimpleProxyResolver *resolver,
|
||||
{
|
||||
GSimpleProxyResolverDomain *domain = &priv->ignore_domains[i];
|
||||
|
||||
if (domain->length > length)
|
||||
continue;
|
||||
|
||||
offset = length - domain->length;
|
||||
if ((domain->port == 0 || domain->port == port) &&
|
||||
(offset == 0 || (offset > 0 && host[offset - 1] == '.')) &&
|
||||
|
Loading…
Reference in New Issue
Block a user