From nobody Thu Mar 09 15:46:11 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PXYSM6KFBz3x4Tw; Thu, 9 Mar 2023 15:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PXYSM5qwXz3xmB; Thu, 9 Mar 2023 15:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678376771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gy5NDU+eVV2HDHHZtiPh1C1V8WnhlRF8VfSkwqF0rLA=; b=fN/w6ORaFH9uR4GSQ74MT12YORmSHK0X7mMlQC76N80kSfolazzik1zXRl7nF0IXV2JRJy at/M7V2kHReBKGFMnalc+P39kY8LK1KDoiMQlsmuEPJhh0nogtwR3bhrqKbY16U8YmjHhD oqthSrITqXvA/ASmk+czJ7tO3HvuqXZBwtS+HlvXzTouieVsmclZN25mgn6xWEa82Weuc7 VLSbC6UsRg8tIIenic7km/O9mggKw62wNkvAQHINy9GFL0SJhbQhO/gHXSLDQBNDuaHJLy 6r+GQETMufVg6uqhex0z6UbePGoHEuGZ/GCEqp5IDUTpRyzHx6QaUuOqsf2qSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678376771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gy5NDU+eVV2HDHHZtiPh1C1V8WnhlRF8VfSkwqF0rLA=; b=f/BnI9jh4338Q2AyXHC9N4pi5iygCXRqbSSaYMRwJL62sgCcjT938VAe4jKeuQsXhDZcds 8QonDyptjfPqsVrzxqo7St2TPtTBIiDd4jT/eVu5RyXez8zGGDDpno+8uaZcLd9xZ2Ta++ HouZgfmT5/kxOHsZ35fuAnwTphgTdsmBP3VCLgznNaLIRSn7tvwKK2rScPkGZK4kjGMRgK N5ADIjNvZmS/UnNu8BioHLRaFTY+fS9yRwW5PihM92j/6gUuHdu0IH+rMkdvFiw62TUbeF bhUp9B0kjM5O/eHyjkSj6IWGW9GmJBNnPxAqFk0qL/FNHjq7kP+O9F8JEJxW+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678376771; a=rsa-sha256; cv=none; b=QrGT8E9o5XEGjLDkuE1T9Jfeg+paItRxrQ+j9OcQlBpegv5M6C8k0jQwsgQP3C++/zQS+S MR72eLPxA6XjxwUmMUWrnYz+ybXpn/V0XoUnNezSo8XVgZRbWMuJGLs+NQZ1ANRAIQatLp 1dRjB908c5UruKgF1eSb1x8ZmKe9NZZ3hZ5I/4HoDhTa3JZ41v2vFz55H8FrZvgRhv/MvT gKCNCxK1t99FJU6R7/lPaf4m49/4WqFSvomZkxbIXu2HD/sbOmlDQKBAmwU4gf9fMPbhgF r0cVZZupFDtHuyeBQCaajJlDeJi2lhyMSjDk3GA0/okCpBVDZwpmW5u4yixvRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PXYSM4t5Bz1Cq8; Thu, 9 Mar 2023 15:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 329FkBtK047954; Thu, 9 Mar 2023 15:46:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 329FkBKI047951; Thu, 9 Mar 2023 15:46:11 GMT (envelope-from git) Date: Thu, 9 Mar 2023 15:46:11 GMT Message-Id: <202303091546.329FkBKI047951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: da4047d3ba23 - main - fix buildworld after 595d23f777dc. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da4047d3ba23201ae4049dccea1151bd6ca2d1df Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=da4047d3ba23201ae4049dccea1151bd6ca2d1df commit da4047d3ba23201ae4049dccea1151bd6ca2d1df Author: Alexander V. Chernikov AuthorDate: 2023-03-09 15:44:59 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-03-09 15:45:57 +0000 fix buildworld after 595d23f777dc. Reported by: se --- sys/netlink/netlink_snl.h | 4 ++-- sys/netlink/netlink_snl_route.h | 8 ++++---- sys/netlink/netlink_snl_route_compat.h | 3 +++ sys/netlink/netlink_snl_route_parsers.h | 9 +++++---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 4e6524783310..31b90003b519 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -677,7 +677,7 @@ snl_add_msg_attr(struct snl_writer *nw, int attr_type, int attr_len, const void return (false); } - struct nlattr *nla = (struct nlattr *)(&nw->base[nw->offset]); + struct nlattr *nla = (struct nlattr *)(void *)(&nw->base[nw->offset]); nla->nla_len = attr_len + sizeof(struct nlattr); nla->nla_type = attr_type; @@ -838,7 +838,7 @@ snl_finalize_msg(struct snl_writer *nw) return (NULL); } -static bool +static inline bool snl_send_msgs(struct snl_writer *nw) { int offset = nw->offset; diff --git a/sys/netlink/netlink_snl_route.h b/sys/netlink/netlink_snl_route.h index 281794a9d6f7..e67bffde215e 100644 --- a/sys/netlink/netlink_snl_route.h +++ b/sys/netlink/netlink_snl_route.h @@ -134,10 +134,10 @@ snl_add_msg_attr_ip(struct snl_writer *nw, int attrtype, const struct sockaddr * switch (sa->sa_family) { case AF_INET: - addr = &((const struct sockaddr_in *)sa)->sin_addr; + addr = &((const struct sockaddr_in *)(const void *)sa)->sin_addr; return (snl_add_msg_attr(nw, attrtype, 4, addr)); case AF_INET6: - addr = &((const struct sockaddr_in6 *)sa)->sin6_addr; + addr = &((const struct sockaddr_in6 *)(const void *)sa)->sin6_addr; return (snl_add_msg_attr(nw, attrtype, 16, addr)); } @@ -153,10 +153,10 @@ snl_add_msg_attr_ipvia(struct snl_writer *nw, int attrtype, const struct sockadd switch (sa->sa_family) { case AF_INET: - memcpy(&buf[1], &((const struct sockaddr_in *)sa)->sin_addr, 4); + memcpy(&buf[1], &((const struct sockaddr_in *)(const void *)sa)->sin_addr, 4); return (snl_add_msg_attr(nw, attrtype, 5, buf)); case AF_INET6: - memcpy(&buf[1], &((const struct sockaddr_in6 *)sa)->sin6_addr, 16); + memcpy(&buf[1], &((const struct sockaddr_in6 *)(const void *)sa)->sin6_addr, 16); return (snl_add_msg_attr(nw, attrtype, 17, buf)); } diff --git a/sys/netlink/netlink_snl_route_compat.h b/sys/netlink/netlink_snl_route_compat.h index 51904abb4003..0314c5715e4f 100644 --- a/sys/netlink/netlink_snl_route_compat.h +++ b/sys/netlink/netlink_snl_route_compat.h @@ -27,6 +27,9 @@ #ifndef _NETLINK_NETLINK_SNL_ROUTE_COMPAT_H_ #define _NETLINK_NETLINK_SNL_ROUTE_COMPAT_H_ +#include +#include + /* * This file contains netlink-compatible definitions from the * net/route.h header. diff --git a/sys/netlink/netlink_snl_route_parsers.h b/sys/netlink/netlink_snl_route_parsers.h index a76fb7da8ec2..a370f89fb9e3 100644 --- a/sys/netlink/netlink_snl_route_parsers.h +++ b/sys/netlink/netlink_snl_route_parsers.h @@ -28,7 +28,7 @@ #define _NETLINK_NETLINK_SNL_ROUTE_PARSERS_H_ #include -#include +#include /* TODO: this file should be generated automatically */ @@ -72,7 +72,8 @@ struct rta_mpath { }; static bool -nlattr_get_multipath(struct snl_state *ss, struct nlattr *nla, const void *arg, void *target) +nlattr_get_multipath(struct snl_state *ss, struct nlattr *nla, const void *arg __unused, + void *target) { int data_len = nla->nla_len - sizeof(struct nlattr); struct rtnexthop *rtnh; @@ -83,7 +84,7 @@ nlattr_get_multipath(struct snl_state *ss, struct nlattr *nla, const void *arg, struct rta_mpath *mp = snl_allocz(ss, sz); mp->num_nhops = 0; - for (rtnh = (struct rtnexthop *)(nla + 1); data_len > 0; ) { + for (rtnh = (struct rtnexthop *)(void *)(nla + 1); data_len > 0; ) { struct rta_mpath_nh *mpnh = &mp->nhops[mp->num_nhops++]; if (!snl_parse_header(ss, rtnh, rtnh->rtnh_len, &_mpath_nh_parser, mpnh)) @@ -91,7 +92,7 @@ nlattr_get_multipath(struct snl_state *ss, struct nlattr *nla, const void *arg, int len = NL_ITEM_ALIGN(rtnh->rtnh_len); data_len -= len; - rtnh = (struct rtnexthop *)((char *)rtnh + len); + rtnh = (struct rtnexthop *)(void *)((char *)rtnh + len); } if (data_len != 0 || mp->num_nhops == 0) { return (false);