[libsoup] Fix compile warnings
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] Fix compile warnings
- Date: Fri, 5 Mar 2021 18:23:54 +0000 (UTC)
commit e81847ca8aa4c6e8d7d9208e0146db12542141f4
Author: Patrick Griffis <pgriffis igalia com>
Date: Fri Mar 5 12:17:35 2021 -0600
Fix compile warnings
libsoup/auth/soup-auth-ntlm.c | 4 ++--
libsoup/auth/soup-auth.c | 1 +
meson.build | 2 +-
tests/cache-test.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/libsoup/auth/soup-auth-ntlm.c b/libsoup/auth/soup-auth-ntlm.c
index 177894f9..b1320ff8 100644
--- a/libsoup/auth/soup-auth-ntlm.c
+++ b/libsoup/auth/soup-auth-ntlm.c
@@ -763,7 +763,7 @@ soup_ntlm_parse_challenge (const char *challenge,
}
if (nonce) {
- *nonce = g_memdup (chall + NTLM_CHALLENGE_NONCE_OFFSET,
+ *nonce = g_memdup2 (chall + NTLM_CHALLENGE_NONCE_OFFSET,
NTLM_CHALLENGE_NONCE_LENGTH);
}
/* For NTLMv2 response */
@@ -776,7 +776,7 @@ soup_ntlm_parse_challenge (const char *challenge,
g_free (chall);
return FALSE;
}
- *target_info = g_memdup (chall + target.offset, target.length);
+ *target_info = g_memdup2 (chall + target.offset, target.length);
*target_info_sz = target.length;
}
diff --git a/libsoup/auth/soup-auth.c b/libsoup/auth/soup-auth.c
index 710b095b..17040b74 100644
--- a/libsoup/auth/soup-auth.c
+++ b/libsoup/auth/soup-auth.c
@@ -137,6 +137,7 @@ soup_auth_get_property (GObject *object, guint prop_id,
break;
case PROP_IS_CANCELLED:
g_value_set_boolean (value, priv->cancelled);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
diff --git a/meson.build b/meson.build
index ae495817..eeb37ccd 100644
--- a/meson.build
+++ b/meson.build
@@ -88,7 +88,7 @@ endif
add_project_arguments(common_flags, language : 'c')
-glib_required_version = '>= 2.67.1'
+glib_required_version = '>= 2.67.4'
glib_dep = dependency('glib-2.0', version : glib_required_version,
fallback: ['glib', 'libglib_dep'])
gobject_dep = dependency('gobject-2.0', version : glib_required_version,
diff --git a/tests/cache-test.c b/tests/cache-test.c
index 10bfd493..cf61a69b 100644
--- a/tests/cache-test.c
+++ b/tests/cache-test.c
@@ -211,7 +211,7 @@ do_request (SoupSession *session,
/* Cache writes are G_PRIORITY_LOW, so they won't have happened yet... */
soup_cache_flush ((SoupCache *)soup_session_get_feature (session, SOUP_TYPE_CACHE));
- return nread ? g_memdup (buf, nread) : g_strdup ("");
+ return nread ? g_memdup2 (buf, nread) : g_strdup ("");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]