From patchwork Sun Mar 19 15:09:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 66609 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E8CE7383FB81 for ; Sun, 19 Mar 2023 15:16:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E8CE7383FB81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679238994; bh=bCxXxBbqsCtDVHYshFPQ9p3g+FnvYAkoNIS61Otexjw=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=H63ho+wfhE8H50tNaoMKCWMcSCH9sEOtidg6nVO7YmV5NqkHAgUop9XKYkSPNmEYn IxXi7/npGm0Ub5MexX9CjMsFRHOSF/ZhGzwfySr8RoBGVeu5cyuCYXqPifDhmoNyZt Vcy4wNlQ5z8KMavElkxiT6Y1cdbvHzcCHFzzfZMw= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org 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 Received: by mail-lf1-x12f.google.com with SMTP id s8so11743117lfr.8 for ; Sun, 19 Mar 2023 08:11:09 -0700 (PDT) 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) 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 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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;