From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id 21B5C385B52E for ; Sun, 19 Mar 2023 15:11:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21B5C385B52E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-x12f.google.com with SMTP id s8so11743117lfr.8 for ; Sun, 19 Mar 2023 08:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679238667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bCxXxBbqsCtDVHYshFPQ9p3g+FnvYAkoNIS61Otexjw=; b=aLp+7xV+65cOU1EfhfmehITkuCxa8ViSQ5HBtOD/SSrqFAaJHRFlMCRSjzgTIcoYc6 FOxJ1HjaWx+JAxMf1agDqnm+oZaZkCIkEO/3RgG+0p2EkfQLu3F+Bq1JkxHspYgzHAtE Pha1p1w9t6aXhNMduIA2pIB0IxVj+tJ0KQrOfEtg4cjkCcRL+czwbSe8uOSwxZEweKS2 JwyiSAd4esFyt5r3VBZ8LCI84ibAR+wwvcJ+5WDxQcBvvSJD894gKUzgw7sK3MkRTAV2 tpbY0L9oU+55RbixMU4P+ZSmOVKNyIdLLqehdkZmm70P3MYE7RtO0Irpz06//B3dOIIv XpxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679238667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bCxXxBbqsCtDVHYshFPQ9p3g+FnvYAkoNIS61Otexjw=; b=avXlXO1kcJx/LuPuTSsSkP/8L2r5bdHDnnlVDMKBeiqhDsmxzbN3DuxL+kCa2m2Iz3 cdze6FvmDJ6z5NfCgh1HjjfkvnFkSvwx0351c7BSpirE5D7/6MGdFJ6ErNg6N/TJMcB0 0B/PE4ZBh7bggvncGgwua6eFNH+1SeQwUfZw9iEznsHn7H8FC/O4msK7pvGVq+4x/xp+ OcTUo5zdFNApezMKDF5MWpoMV7+hBAKBd4u8m8IkMk18OhcD3OiL/JDbMZ+RoJUHeT5i P8j5O0nL2KSw/77cCwYvdAMezNz3NdmC5Yf2h9roojnB1b0LmPADqJjKD6nz0lF7yhgK u86g== X-Gm-Message-State: AO0yUKUCer9zIuev/AbYPv3zE/fJR2QndLMFsgfRh7FOYtTCy2wigonW 1DflKpTrzsBRkpLbf3e0ZFNi5nhvk9Cftg== X-Google-Smtp-Source: AK7set+zgc+4ZsunUA0bCHhDS+z+/IYDU5mIgPKfxrUUggCqTMURAQsbI1lTbUNPiLgoJpzYeOvXgQ== X-Received: by 2002:a05:6512:2191:b0:4d7:807:4eaa with SMTP id b17-20020a056512219100b004d708074eaamr5427696lft.43.1679238667451; Sun, 19 Mar 2023 08:11:07 -0700 (PDT) Received: from surface-pro-6.. ([2a00:1370:818c:4a57:577a:76f4:df43:5e66]) by smtp.gmail.com with ESMTPSA id m19-20020ac24253000000b004e90dee5469sm1274089lfl.157.2023.03.19.08.11.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 08:11:07 -0700 (PDT) From: Sergey Bugaev To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Samuel Thibault , Sergey Bugaev Subject: [RFC PATCH glibc 12/34] hurd: More 64-bit integer casting fixes Date: Sun, 19 Mar 2023 18:09:55 +0300 Message-Id: <20230319151017.531737-13-bugaevc@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230319151017.531737-1-bugaevc@gmail.com> References: <20230319151017.531737-1-bugaevc@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Signed-off-by: Sergey Bugaev --- 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 0f5de5d3..ab913a59 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 6ca27155..48c330ec 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; -- 2.39.2