diff --git a/base/networking.c b/base/networking.c index 41017db77..439e1e8b8 100644 --- a/base/networking.c +++ b/base/networking.c @@ -365,13 +365,19 @@ gvm_resolve_list (const char *name) { struct sockaddr_in *addrin = (struct sockaddr_in *) p->ai_addr; ipv4_as_ipv6 (&(addrin->sin_addr), &dst); +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wdeprecated-declarations" list = g_slist_prepend (list, g_memdup (&dst, sizeof (dst))); +#pragma GCC diagnostic pop } else if (p->ai_family == AF_INET6) { struct sockaddr_in6 *addrin = (struct sockaddr_in6 *) p->ai_addr; memcpy (&dst, &(addrin->sin6_addr), sizeof (struct in6_addr)); +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wdeprecated-declarations" list = g_slist_prepend (list, g_memdup (&dst, sizeof (dst))); +#pragma GCC diagnostic pop } p = p->ai_next; } diff --git a/util/kb.c b/util/kb.c index c41b53a3e..c94826c34 100644 --- a/util/kb.c +++ b/util/kb.c @@ -629,7 +629,10 @@ redis2kbitem_single (const char *name, const redisReply *elt, int force_int) else { item->type = KB_TYPE_STR; +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wdeprecated-declarations" item->v_str = g_memdup (elt->str, elt->len + 1); +#pragma GCC diagnostic pop item->len = elt->len; }