[libsoup/wip/nacho/soup-extern: 5/12] Fix some conversion warnings
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/nacho/soup-extern: 5/12] Fix some conversion warnings
- Date: Tue, 3 Nov 2015 08:47:12 +0000 (UTC)
commit df630bdba8931f27937156a176d3ddfa72288a29
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Oct 29 12:11:39 2015 +0100
Fix some conversion warnings
https://bugzilla.gnome.org/show_bug.cgi?id=757295
libsoup/soup-auth-manager.c | 2 +-
libsoup/soup-cache.c | 2 +-
libsoup/soup-cookie-jar.c | 4 ++--
libsoup/soup-cookie.c | 4 ++--
libsoup/soup-headers.c | 4 ++--
libsoup/soup-message-headers.c | 2 +-
libsoup/soup-socket.c | 4 ++--
7 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/libsoup/soup-auth-manager.c b/libsoup/soup-auth-manager.c
index 0709c42..8a70ac3 100644
--- a/libsoup/soup-auth-manager.c
+++ b/libsoup/soup-auth-manager.c
@@ -315,7 +315,7 @@ static char *
soup_auth_manager_extract_challenge (const char *challenges, const char *scheme)
{
GSList *items, *i, *next;
- int schemelen = strlen (scheme);
+ gsize schemelen = strlen (scheme);
char *item;
GString *challenge;
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c
index d5f5586..1d16db9 100644
--- a/libsoup/soup-cache.c
+++ b/libsoup/soup-cache.c
@@ -566,7 +566,7 @@ lru_compare_func (gconstpointer a, gconstpointer b)
return entry_a->freshness_lifetime - entry_b->freshness_lifetime;
/* Sort by size */
- return entry_a->length - entry_b->length;
+ return (gint)(entry_a->length - entry_b->length);
}
static gboolean
diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c
index d12bc85..77d5cc1 100644
--- a/libsoup/soup-cookie-jar.c
+++ b/libsoup/soup-cookie-jar.c
@@ -276,7 +276,7 @@ compare_cookies (gconstpointer a, gconstpointer b, gpointer jar)
SoupCookie *ca = (SoupCookie *)a;
SoupCookie *cb = (SoupCookie *)b;
SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar);
- int alen, blen;
+ gsize alen, blen;
guint aserial, bserial;
/* "Cookies with longer path fields are listed before cookies
@@ -285,7 +285,7 @@ compare_cookies (gconstpointer a, gconstpointer b, gpointer jar)
alen = ca->path ? strlen (ca->path) : 0;
blen = cb->path ? strlen (cb->path) : 0;
if (alen != blen)
- return blen - alen;
+ return (int)(blen - alen);
/* "Among cookies that have equal length path fields, cookies
* with earlier creation dates are listed before cookies with
diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c
index 5af36e9..a8beda6 100644
--- a/libsoup/soup-cookie.c
+++ b/libsoup/soup-cookie.c
@@ -108,7 +108,7 @@ gboolean
soup_cookie_domain_matches (SoupCookie *cookie, const char *host)
{
char *match;
- int dlen;
+ gsize dlen;
const char *domain;
g_return_val_if_fail (cookie != NULL, FALSE);
@@ -1027,7 +1027,7 @@ soup_cookies_to_cookie_header (GSList *cookies)
gboolean
soup_cookie_applies_to_uri (SoupCookie *cookie, SoupURI *uri)
{
- int plen;
+ gsize plen;
if (cookie->secure && uri->scheme != SOUP_URI_SCHEME_HTTPS)
return FALSE;
diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c
index 9c4c808..0bc81f8 100644
--- a/libsoup/soup-headers.c
+++ b/libsoup/soup-headers.c
@@ -617,7 +617,7 @@ gboolean
soup_header_contains (const char *header, const char *token)
{
const char *end;
- guint len = strlen (token);
+ gsize len = strlen (token);
g_return_val_if_fail (header != NULL, FALSE);
g_return_val_if_fail (token != NULL, FALSE);
@@ -834,7 +834,7 @@ append_param_quoted (GString *string,
const char *name,
const char *value)
{
- int len;
+ gsize len;
g_string_append (string, name);
g_string_append (string, "=\"");
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
index f850926..2702482 100644
--- a/libsoup/soup-message-headers.c
+++ b/libsoup/soup-message-headers.c
@@ -925,7 +925,7 @@ sort_ranges (gconstpointer a, gconstpointer b)
SoupRange *ra = (SoupRange *)a;
SoupRange *rb = (SoupRange *)b;
- return ra->start - rb->start;
+ return (int)(ra->start - rb->start);
}
/* like soup_message_headers_get_ranges(), except it returns:
diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c
index 594e38b..a5c5d19 100644
--- a/libsoup/soup-socket.c
+++ b/libsoup/soup-socket.c
@@ -1648,7 +1648,7 @@ soup_socket_get_local_address (SoupSocket *sock)
}
sa_len = g_socket_address_get_native_size (addr);
g_socket_address_to_native (addr, &sa, sa_len, NULL);
- priv->local_addr = soup_address_new_from_sockaddr ((struct sockaddr *)&sa, sa_len);
+ priv->local_addr = soup_address_new_from_sockaddr ((struct sockaddr *)&sa, (int)sa_len);
g_object_unref (addr);
}
unlock:
@@ -1696,7 +1696,7 @@ soup_socket_get_remote_address (SoupSocket *sock)
}
sa_len = g_socket_address_get_native_size (addr);
g_socket_address_to_native (addr, &sa, sa_len, NULL);
- priv->remote_addr = soup_address_new_from_sockaddr ((struct sockaddr *)&sa, sa_len);
+ priv->remote_addr = soup_address_new_from_sockaddr ((struct sockaddr *)&sa, (int)sa_len);
g_object_unref (addr);
}
unlock:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]