Re: Remove some useless casts to (void *) - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Remove some useless casts to (void *)
Date
Msg-id CADkLM=edJ4DBQQn1jZcDs9Lhn+s3o5P7PT3y3y_QRPcwQ8s3SA@mail.gmail.com
Whole thread Raw
In response to Remove some useless casts to (void *)  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: Remove some useless casts to (void *)
List pgsql-hackers


On Thu, Feb 2, 2023 at 5:22 PM Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
I have found that in some corners of the code some calls to standard C
functions are decorated with casts to (void *) for no reason, and this
code pattern then gets copied around.  I have gone through and cleaned
this up a bit, in the attached patches.

The involved functions are: repalloc, memcpy, memset, memmove, memcmp,
qsort, bsearch

Also hash_search(), for which there was a historical reason (the
argument used to be char *), but not anymore.

+1

All code is example code.

Applies.
Passes make check world.
 

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Amcheck verification of GiST and GIN
Next
From: Peter Smith
Date:
Subject: Re: Support logical replication of DDLs