From patchwork Sun Dec 29 16:51:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 37118 Received: (qmail 41303 invoked by alias); 29 Dec 2019 16:51:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 41294 invoked by uid 89); 29 Dec 2019 16:51:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.1 spammy=1087, HContent-Transfer-Encoding:8bit X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited] hurd sendmsg: Fix warning on calling CMSG_*HDR Date: Sun, 29 Dec 2019 17:51:08 +0100 Message-Id: <20191229165108.2856915-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- sysdeps/mach/hurd/sendmsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/mach/hurd/sendmsg.c b/sysdeps/mach/hurd/sendmsg.c index 0c19b3223c..3d7317cec4 100644 --- a/sysdeps/mach/hurd/sendmsg.c +++ b/sysdeps/mach/hurd/sendmsg.c @@ -108,7 +108,7 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags) /* Allocate enough room for ports. */ cmsg = CMSG_FIRSTHDR (message); - for (; cmsg; cmsg = CMSG_NXTHDR (message, cmsg)) + for (; cmsg; cmsg = CMSG_NXTHDR ((struct msghdr *) message, cmsg)) if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) nports += (cmsg->cmsg_len - CMSG_ALIGN (sizeof (struct cmsghdr))) / sizeof (int); @@ -119,7 +119,7 @@ __libc_sendmsg (int fd, const struct msghdr *message, int flags) nports = 0; for (cmsg = CMSG_FIRSTHDR (message); cmsg; - cmsg = CMSG_NXTHDR (message, cmsg)) + cmsg = CMSG_NXTHDR ((struct msghdr *) message, cmsg)) { if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {