Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6gB2-00EmAT-Fj for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Nov 2024 01:10:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t6gB0-007kjS-2g for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Nov 2024 01:10:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6gAz-007kjA-PN for pgsql-hackers@lists.postgresql.org; Fri, 01 Nov 2024 01:10:10 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t6gAt-003sJp-DR for pgsql-hackers@postgresql.org; Fri, 01 Nov 2024 01:10:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=P2OJmVS+ZuEMp3BuaSZFcq/9IP6s8k70dOF6xl8QkVA=; b=UpqCW eu7uXUV2rkTmTKXn9a2G0PULm98ZnyXAo4H5WnBRaEAv12ZB4EqXPTELBfNYsOJe1+D1OvkoU+Tj6 VX2fFhvZ5LAUV7UDpF6t5MEqCnxvbSr/B0jLVqAGOe5rEAf9Y1TrytUr4Bsb+sjCJQ49xXqgW/ILW iqWyhen4B3zcyTurgfIlVXNHgsC7b133hxPqkoYYEl7C/yMPR3mL7RpFvPHlq1dIbEs6Gbf6vJDxb SY4Tw9WSZr9V7Z9P02qBBtlB/4WUqyoRFiJp2hg/dUzH/NNcFQIVCxe5gTtifCblsq1PHe6W5Temn 3Llg2SPTrOIJY475LoUA64DfpMFdQ==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1t6gAr-004FQX-3C; Thu, 31 Oct 2024 21:10:01 -0400 Date: Thu, 31 Oct 2024 21:10:01 -0400 From: Bruce Momjian To: Tom Lane Cc: Peter Eisentraut , pgsql-hackers Subject: Re: Remove useless casts to (void *) Message-ID: References: <461ea37c-8b58-43b4-9736-52884e862820@eisentraut.org> <166213.1730211603@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <166213.1730211603@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Oct 29, 2024 at 10:20:03AM -0400, Tom Lane wrote: > Peter Eisentraut writes: > > There are a bunch of (void *) casts in the code that don't make sense to > > me. I think some of these were once necessary because char * was used > > in place of void * for some function arguments. And some of these were > > probably just copied around without further thought. I went through and > > cleaned up most of these. I didn't find any redeeming value in these. > > They are just liable to hide actual problems such as incompatible types. > > But maybe there are other opinions. > > I don't recall details, but I'm fairly sure some of these prevented > compiler warnings on some (old?) compilers. Hard to be sure if said > compilers are all gone. > > Looking at the sheer size of the patch, I'm kind of -0.1, just > because I'm afraid it's going to create back-patching gotchas. > I don't really find that it's improving readability, though > clearly that's a matter of opinion. I kind of liked the patch in terms of simplifying things. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com When a patient asks the doctor, "Am I going to die?", he means "Am I going to die soon?"