pgsql: Remove unnecessary casts

2022-12-30 Thread Peter Eisentraut
Remove unnecessary casts Some code carefully cast all data buffer arguments for data write and read function calls to void *, even though the respective arguments are already void *. Remove this unnecessary clutter. Discussion: https://www.postgresql.org/message-id/flat/11dda853-bb5b-59ba-a746-

pgsql: Remove unnecessary casts

2022-12-08 Thread Peter Eisentraut
Remove unnecessary casts Some code carefully cast all data buffer arguments for BufFileWrite() and BufFileRead() to void *, even though the arguments are already void * (and AFAICT were never anything else). Remove this unnecessary clutter. Discussion: https://www.postgresql.org/message-id/flat

Re: pgsql: Remove unnecessary casts in free() and pfree()

2022-08-27 Thread Tom Lane
I wrote: > Justin Pryzby writes: >> This seems to be breaking cfbot's "warnings" test. > Hmm, well, casting away const is certainly not within pfree's remit, > so I'm glad we changed this. Oh, I see: sepgsql's quote_object_name() is doing const char *temp; temp = quote_identifi

Re: pgsql: Remove unnecessary casts in free() and pfree()

2022-08-27 Thread Tom Lane
Justin Pryzby writes: > On Fri, Aug 26, 2022 at 02:02:33PM +, Peter Eisentraut wrote: >> Remove unnecessary casts in free() and pfree() > This seems to be breaking cfbot's "warnings" test. > [07:49:48.983] label.c:665:10: error: passing argument 1 of ‘pfree’ discards > ‘const’ qualifier fro

Re: pgsql: Remove unnecessary casts in free() and pfree()

2022-08-27 Thread Justin Pryzby
On Fri, Aug 26, 2022 at 02:02:33PM +, Peter Eisentraut wrote: > Remove unnecessary casts in free() and pfree() This seems to be breaking cfbot's "warnings" test. [07:49:48.983] label.c:665:10: error: passing argument 1 of ‘pfree’ discards ‘const’ qualifier from pointer target type [-Werror=d

pgsql: Remove unnecessary casts in free() and pfree()

2022-08-26 Thread Peter Eisentraut
Remove unnecessary casts in free() and pfree() Reviewed-by: Tom Lane Discussion: https://www.postgresql.org/message-id/flat/cf26e970-8e92-59f1-247a-aa265235075b%40enterprisedb.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/45987aae260a441886a010323bf3e143ce8e

pgsql: Remove unnecessary casts from size_t to int

2019-07-04 Thread Peter Eisentraut
Remove unnecessary casts from size_t to int We can use the %zu format specifier directly, no need to cast to int. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d5ab9df7774b4570ff50e64b7fa3ba8295596d06 Modified Files -- src/interfaces/ecpg/preproc/ecpg