Thread: pgsql: Remove useless casts to (void *)

pgsql: Remove useless casts to (void *)

From
Peter Eisentraut
Date:
Remove useless casts to (void *)

Many of them just seem to have been copied around for no real reason.
Their presence causes (small) risks of hiding actual type mismatches
or silently discarding qualifiers

Discussion: https://www.postgresql.org/message-id/flat/461ea37c-8b58-43b4-9736-52884e862820@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7f798aca1d5df290aafad41180baea0ae311b4ee

Modified Files
--------------
contrib/amcheck/verify_nbtree.c             |  2 +-
contrib/bloom/blinsert.c                    |  2 +-
contrib/bloom/blutils.c                     |  2 +-
contrib/btree_gist/btree_bit.c              |  2 +-
contrib/btree_gist/btree_bool.c             |  4 +-
contrib/btree_gist/btree_bytea.c            |  2 +-
contrib/btree_gist/btree_cash.c             |  6 +--
contrib/btree_gist/btree_date.c             |  6 +--
contrib/btree_gist/btree_enum.c             |  4 +-
contrib/btree_gist/btree_float4.c           |  6 +--
contrib/btree_gist/btree_float8.c           |  6 +--
contrib/btree_gist/btree_inet.c             |  4 +-
contrib/btree_gist/btree_int2.c             |  6 +--
contrib/btree_gist/btree_int4.c             |  6 +--
contrib/btree_gist/btree_int8.c             |  6 +--
contrib/btree_gist/btree_interval.c         |  6 +--
contrib/btree_gist/btree_macaddr.c          |  4 +-
contrib/btree_gist/btree_macaddr8.c         |  4 +-
contrib/btree_gist/btree_numeric.c          |  2 +-
contrib/btree_gist/btree_oid.c              |  6 +--
contrib/btree_gist/btree_text.c             |  4 +-
contrib/btree_gist/btree_time.c             |  8 +--
contrib/btree_gist/btree_ts.c               | 10 ++--
contrib/btree_gist/btree_uuid.c             |  4 +-
contrib/file_fdw/file_fdw.c                 |  8 +--
contrib/hstore/hstore_op.c                  |  2 +-
contrib/intarray/_int_bool.c                |  6 +--
contrib/ltree/_ltree_gist.c                 |  2 +-
contrib/ltree/_ltree_op.c                   | 18 +++----
contrib/pg_trgm/trgm_gist.c                 |  2 +-
contrib/pgcrypto/openssl.c                  |  2 +-
contrib/postgres_fdw/postgres_fdw.c         | 10 ++--
src/backend/access/brin/brin.c              |  4 +-
src/backend/access/brin/brin_minmax_multi.c |  8 +--
src/backend/access/common/detoast.c         |  2 +-
src/backend/access/gin/ginbulk.c            |  2 +-
src/backend/access/gin/gininsert.c          |  5 +-
src/backend/access/gist/gist.c              |  2 +-
src/backend/access/gist/gistbuild.c         |  4 +-
src/backend/access/hash/hash.c              |  2 +-
src/backend/access/heap/vacuumlazy.c        |  2 +-
src/backend/access/nbtree/nbtree.c          | 10 ++--
src/backend/access/nbtree/nbtsort.c         |  4 +-
src/backend/access/spgist/spginsert.c       |  2 +-
src/backend/access/spgist/spgutils.c        |  2 +-
src/backend/access/transam/twophase.c       |  5 +-
src/backend/access/transam/xlogrecovery.c   |  8 +--
src/backend/catalog/dependency.c            |  4 +-
src/backend/catalog/heap.c                  |  2 +-
src/backend/catalog/index.c                 |  2 +-
src/backend/catalog/objectaccess.c          | 16 +++---
src/backend/catalog/pg_proc.c               |  2 +-
src/backend/catalog/pg_publication.c        |  2 +-
src/backend/commands/copyfrom.c             |  2 +-
src/backend/commands/foreigncmds.c          |  2 +-
src/backend/commands/indexcmds.c            |  2 +-
src/backend/commands/lockcmds.c             |  2 +-
src/backend/commands/policy.c               |  6 +--
src/backend/commands/publicationcmds.c      |  6 +--
src/backend/commands/tablecmds.c            | 10 ++--
src/backend/commands/tablespace.c           |  2 +-
src/backend/commands/typecmds.c             |  2 +-
src/backend/commands/vacuum.c               |  2 +-
src/backend/commands/variable.c             |  6 +--
src/backend/executor/execExpr.c             |  3 +-
src/backend/executor/execExprInterp.c       | 34 ++++++------
src/backend/executor/execIndexing.c         |  2 +-
src/backend/executor/functions.c            |  4 +-
src/backend/executor/nodeAgg.c              | 13 +++--
src/backend/executor/nodeSort.c             |  2 +-
src/backend/executor/nodeWindowAgg.c        |  8 +--
src/backend/libpq/hba.c                     |  2 +-
src/backend/nodes/nodeFuncs.c               |  4 +-
src/backend/nodes/params.c                  |  2 +-
src/backend/nodes/read.c                    |  2 +-
src/backend/optimizer/geqo/geqo_main.c      |  2 +-
src/backend/optimizer/path/costsize.c       |  3 +-
src/backend/optimizer/path/indxpath.c       |  2 +-
src/backend/optimizer/plan/createplan.c     |  4 +-
src/backend/optimizer/plan/setrefs.c        | 30 ++++-------
src/backend/optimizer/plan/subselect.c      | 21 +++-----
src/backend/optimizer/prep/prepagg.c        |  3 +-
src/backend/optimizer/prep/prepjointree.c   | 28 ++++------
src/backend/optimizer/util/appendinfo.c     |  5 +-
src/backend/optimizer/util/clauses.c        | 29 +++++------
src/backend/optimizer/util/predtest.c       | 10 ++--
src/backend/optimizer/util/tlist.c          |  6 +--
src/backend/optimizer/util/var.c            | 45 +++++++---------
src/backend/parser/analyze.c                |  2 +-
src/backend/parser/parse_agg.c              | 12 ++---
src/backend/parser/parse_collate.c          | 16 +++---
src/backend/parser/parse_cte.c              | 12 ++---
src/backend/parser/parse_node.c             |  2 +-
src/backend/parser/parse_param.c            | 10 ++--
src/backend/parser/scan.l                   |  2 +-
src/backend/partitioning/partprune.c        |  3 +-
src/backend/port/sysv_shmem.c               |  6 +--
src/backend/replication/logical/logical.c   | 44 ++++++++--------
src/backend/replication/logical/tablesync.c |  2 +-
src/backend/replication/slot.c              |  2 +-
src/backend/replication/syncrep.c           |  2 +-
src/backend/rewrite/rewriteDefine.c         |  4 +-
src/backend/rewrite/rewriteHandler.c        |  9 ++--
src/backend/rewrite/rewriteManip.c          | 81 ++++++++++++-----------------
src/backend/storage/buffer/buf_table.c      |  2 +-
src/backend/storage/buffer/bufmgr.c         |  4 +-
src/backend/storage/ipc/shmem.c             |  4 +-
src/backend/tcop/postgres.c                 |  6 +--
src/backend/tsearch/dict_thesaurus.c        |  2 +-
src/backend/tsearch/spell.c                 |  2 +-
src/backend/tsearch/ts_locale.c             |  2 +-
src/backend/tsearch/ts_parse.c              | 12 ++---
src/backend/tsearch/wparser.c               |  8 +--
src/backend/utils/adt/acl.c                 |  2 +-
src/backend/utils/adt/array_userfuncs.c     |  8 +--
src/backend/utils/adt/arrayfuncs.c          | 14 ++---
src/backend/utils/adt/datetime.c            |  2 +-
src/backend/utils/adt/datum.c               |  4 +-
src/backend/utils/adt/domains.c             |  6 +--
src/backend/utils/adt/enum.c                |  2 +-
src/backend/utils/adt/expandedrecord.c      |  8 +--
src/backend/utils/adt/jsonb.c               |  4 +-
src/backend/utils/adt/jsonfuncs.c           | 26 ++++-----
src/backend/utils/adt/jsonpath_exec.c       |  2 +-
src/backend/utils/adt/jsonpath_scan.l       |  2 +-
src/backend/utils/adt/lockfuncs.c           |  2 +-
src/backend/utils/adt/multirangetypes.c     |  4 +-
src/backend/utils/adt/orderedsetaggs.c      |  2 +-
src/backend/utils/adt/partitionfuncs.c      |  4 +-
src/backend/utils/adt/rangetypes.c          |  4 +-
src/backend/utils/adt/regexp.c              |  4 +-
src/backend/utils/adt/tsgistidx.c           |  2 +-
src/backend/utils/adt/tsrank.c              |  6 +--
src/backend/utils/adt/tsvector_op.c         |  2 +-
src/backend/utils/adt/xml.c                 | 14 ++---
src/backend/utils/cache/plancache.c         |  6 +--
src/backend/utils/cache/typcache.c          |  2 +-
src/backend/utils/error/elog.c              |  2 +-
src/backend/utils/hash/dynahash.c           | 12 ++---
src/backend/utils/mmgr/mcxt.c               |  2 +-
src/backend/utils/sort/tuplesortvariants.c  | 12 ++---
src/backend/utils/sort/tuplestore.c         | 10 ++--
src/bin/pg_dump/pg_backup_archiver.c        |  4 +-
src/bin/pg_dump/pg_backup_custom.c          |  6 +--
src/bin/pg_dump/pg_backup_directory.c       |  6 +--
src/bin/pg_dump/pg_backup_tar.c             |  8 +--
src/bin/psql/mainloop.c                     |  2 +-
src/bin/psql/startup.c                      |  2 +-
src/include/common/pg_prng.h                |  2 +-
src/interfaces/ecpg/ecpglib/connect.c       |  2 +-
src/interfaces/ecpg/ecpglib/descriptor.c    |  4 +-
src/interfaces/ecpg/ecpglib/memory.c        |  2 +-
src/pl/plpgsql/src/pl_comp.c                |  4 +-
src/pl/plpgsql/src/pl_exec.c                | 10 ++--
src/pl/plpgsql/src/pl_handler.c             |  2 +-
src/pl/plpython/plpy_exec.c                 |  4 +-
src/test/isolation/isolationtester.c        |  2 +-
src/test/modules/test_regex/test_regex.c    |  2 +-
158 files changed, 491 insertions(+), 550 deletions(-)