From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Remove useless casts to (void *) |
Date: | 2024-10-29 14:20:03 |
Message-ID: | 166213.1730211603@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut <peter(at)eisentraut(dot)org> 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.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Rafia Sabih | 2024-10-29 14:34:41 | Cleanup SubPlanstate |
Previous Message | Tom Lane | 2024-10-29 14:12:51 | Re: Support regular expressions with nondeterministic collations |