From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1792) id C3D0B3858C5E; Sun, 2 Apr 2023 23:28:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C3D0B3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680478104; bh=7BnXSNabZgiO4lyggFuUEHQxKSF2kp/4/KIY2B7DDMQ=; h=From:To:Subject:Date:From; b=obj50AgjGDpvsc0eC2PNz3RMDcA9sNCbbs7HvIHNXMp4lnZ5FOvCO5Rwd5xGSP1Pg 7QTnnj61YYXgOJCuqFlG/jjuk4IWYrs/KblDlP6xzvUhGgCuJoCfhvVIFJLBevxZhY u1Tu8/GfvFMqix058JCICbX9zSYmpO52DNU3oTEk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Samuel Thibault To: glibc-cvs@sourceware.org Subject: [glibc] hurd: More 64-bit integer casting fixes X-Act-Checkin: glibc X-Git-Author: Sergey Bugaev X-Git-Refname: refs/heads/master X-Git-Oldrev: af2942cc622809650b3158fe61d73a0de952a10a X-Git-Newrev: 0001a23f7a3701ef0ef7b25901c5e9990beea8f4 Message-Id: <20230402232824.C3D0B3858C5E@sourceware.org> Date: Sun, 2 Apr 2023 23:28:24 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0001a23f7a3701ef0ef7b25901c5e9990beea8f4 commit 0001a23f7a3701ef0ef7b25901c5e9990beea8f4 Author: Sergey Bugaev Date: Sun Mar 19 18:09:55 2023 +0300 hurd: More 64-bit integer casting fixes Signed-off-by: Sergey Bugaev Message-Id: <20230319151017.531737-13-bugaevc@gmail.com> Diff: --- sysdeps/mach/hurd/ioctl.c | 4 ++-- sysdeps/mach/hurd/x86/init-first.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c index 0f5de5d3fb..ab913a5943 100644 --- a/sysdeps/mach/hurd/ioctl.c +++ b/sysdeps/mach/hurd/ioctl.c @@ -149,10 +149,10 @@ __ioctl (int fd, unsigned long int request, ...) Rather than pointing to the value, ARG is the value itself. */ #ifdef MACH_MSG_TYPE_BIT *t++ = io2mach_type (1, _IOTS (integer_t)); - *(integer_t *) t = (integer_t) arg; + *(integer_t *) t = (integer_t) (intptr_t) arg; t = (void *) t + sizeof (integer_t); #else - *(integer_t *) p = (integer_t) arg; + *(integer_t *) p = (integer_t) (intptr_t) arg; p = (void *) p + sizeof (integer_t); #endif } diff --git a/sysdeps/mach/hurd/x86/init-first.c b/sysdeps/mach/hurd/x86/init-first.c index 6ca27155a4..48c330ec06 100644 --- a/sysdeps/mach/hurd/x86/init-first.c +++ b/sysdeps/mach/hurd/x86/init-first.c @@ -1,4 +1,4 @@ -/* Initialization code run first thing by the ELF startup code. For i386/Hurd. +/* Initialization code run first thing by the ELF startup code. For x86/Hurd. Copyright (C) 1995-2023 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -92,7 +92,7 @@ posixland_init (int argc, char **argv, char **envp) static void init (void **data) { - int argc = (int) *data; + int argc = (int) (uintptr_t) *data; char **argv = (void *) (data + 1); char **envp = &argv[argc + 1]; struct hurd_startup_data *d;