]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Remove useless casts to (void *)
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 28 Nov 2024 07:19:22 +0000 (08:19 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 28 Nov 2024 07:27:20 +0000 (08:27 +0100)
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

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

index 8b82797c10faeb6f739a281041a8720160940ae6..ffe4f7216729663e8e1a518c994213e51cfa835b 100644 (file)
@@ -719,7 +719,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
                         RelationGetRelationName(state->heaprel));
 
                table_index_build_scan(state->heaprel, state->rel, indexinfo, true, false,
-                                                          bt_tuple_present_callback, (void *) state, scan);
+                                                          bt_tuple_present_callback, state, scan);
 
                ereport(DEBUG1,
                                (errmsg_internal("finished verifying presence of " INT64_FORMAT " tuples from table \"%s\" with bitset %.2f%% set",
index dbb79a51eddb6df2f03b40635f188b92908a13d6..5da3df0528100b9f17602690675ca8df54a2035d 100644 (file)
@@ -139,7 +139,7 @@ blbuild(Relation heap, Relation index, IndexInfo *indexInfo)
 
        /* Do the heap scan */
        reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
-                                                                          bloomBuildCallback, (void *) &buildstate,
+                                                                          bloomBuildCallback, &buildstate,
                                                                           NULL);
 
        /* Flush last page if needed (it will be, unless heap was empty) */
index af10199394a9d7877ec783037ff00f4bbaf8a515..ef77688a8d3465d3c1cd150389d982198bf5c252 100644 (file)
@@ -199,7 +199,7 @@ initBloomState(BloomState *state, Relation index)
 
                UnlockReleaseBuffer(buffer);
 
-               index->rd_amcache = (void *) opts;
+               index->rd_amcache = opts;
        }
 
        memcpy(&state->opts, index->rd_amcache, sizeof(state->opts));
index 9d5e01a1977208abe84574a57e5bf43e688155ca..f346b956fa9218fbc99bd86f27ff37c03fc1fa7d 100644 (file)
@@ -136,7 +136,7 @@ Datum
 gbt_bit_consistent(PG_FUNCTION_ARGS)
 {
        GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-       void       *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
+       void       *query = DatumGetByteaP(PG_GETARG_DATUM(1));
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
 
        /* Oid          subtype = PG_GETARG_OID(3); */
index bdc7834bb6acd266865bd612e2303a99f880a491..adb724e16ac619580984b0ef5fe6b2e7946e2933 100644 (file)
@@ -120,7 +120,7 @@ gbt_bool_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -132,7 +132,7 @@ gbt_bool_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(boolKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(boolKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 394e40ed16b2a153895abe41f956e2a648deed91..5eacb8c59a05e905bcd58bc4b4dda0c0a0b4c8a0 100644 (file)
@@ -104,7 +104,7 @@ Datum
 gbt_bytea_consistent(PG_FUNCTION_ARGS)
 {
        GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-       void       *query = (void *) DatumGetByteaP(PG_GETARG_DATUM(1));
+       void       *query = DatumGetByteaP(PG_GETARG_DATUM(1));
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
 
        /* Oid          subtype = PG_GETARG_OID(3); */
index 546b948ea400a413174d5c3120d5c04296703702..c18c34c8b83b2adbcaed1f72c96e43d72864c1a9 100644 (file)
@@ -150,7 +150,7 @@ gbt_cash_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo,
                                                                          fcinfo->flinfo));
 }
@@ -169,7 +169,7 @@ gbt_cash_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -181,7 +181,7 @@ gbt_cash_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(cashKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(cashKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 5efb5ef96f58d3b32c021da3fdb5d906bf7e276a..7a4a9d7a8539ede35547a7a06122ba2e721ba2a0 100644 (file)
@@ -167,7 +167,7 @@ gbt_date_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo,
                                                                          fcinfo->flinfo));
 }
@@ -186,7 +186,7 @@ gbt_date_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -198,7 +198,7 @@ gbt_date_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(dateKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(dateKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 26682122f8ee4a25cc885e188ee2ddc4f3614a3a..05d02e704a0d58efa02be2c8cd41417d4ff938e2 100644 (file)
@@ -137,7 +137,7 @@ gbt_enum_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo,
                                                                          fcinfo->flinfo));
 }
@@ -149,7 +149,7 @@ gbt_enum_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(oidKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 84ca5eee5012cf49466beb4a170578a4dc15ffcb..d138aa94bf2de30c3dc0160b8cf9992c438679ca 100644 (file)
@@ -145,7 +145,7 @@ gbt_float4_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo,
                                                                          fcinfo->flinfo));
 }
@@ -164,7 +164,7 @@ gbt_float4_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -176,7 +176,7 @@ gbt_float4_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(float4KEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(float4KEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 081a719b0061c535e251a4e51fa71004e5728bac..a74cd200529fa799fffa899ec430624668ca1741 100644 (file)
@@ -152,7 +152,7 @@ gbt_float8_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo,
                                                                          fcinfo->flinfo));
 }
@@ -171,7 +171,7 @@ gbt_float8_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -183,7 +183,7 @@ gbt_float8_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(float8KEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(float8KEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index c66ca99e0c3a90d9afb4929043995437133d6ead..4cffd349091795e96f2a790847699e3dd50024f8 100644 (file)
@@ -138,7 +138,7 @@ gbt_inet_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query,
                                                                          &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -150,7 +150,7 @@ gbt_inet_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(inetKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(inetKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index fdbf156586c938d81afc535be4328c9b84fdd5f6..1751a6c055d890dba6b28da80360fe77e9c687fc 100644 (file)
@@ -150,7 +150,7 @@ gbt_int2_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -168,7 +168,7 @@ gbt_int2_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -180,7 +180,7 @@ gbt_int2_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(int16KEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(int16KEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 8915fb5d0877235c7ce425371d19117b77a39777..90d183be6e82bc9eadb7c1c7eef6250b6f4fc230 100644 (file)
@@ -151,7 +151,7 @@ gbt_int4_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -169,7 +169,7 @@ gbt_int4_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -181,7 +181,7 @@ gbt_int4_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(int32KEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(int32KEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 7c63a5b6dc1f84e2eb1178ace39b7a3440b1aac8..661cf8189fc546194e4d2b02b6a091155610affb 100644 (file)
@@ -151,7 +151,7 @@ gbt_int8_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -169,7 +169,7 @@ gbt_int8_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -181,7 +181,7 @@ gbt_int8_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(int64KEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(int64KEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index c2f6eede226bd7490f74738b38f1628dba482e8d..8f99a4169652b4c46eaf78e582369b82e54bd971 100644 (file)
@@ -224,7 +224,7 @@ gbt_intv_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -242,7 +242,7 @@ gbt_intv_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -254,7 +254,7 @@ gbt_intv_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(intvKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(intvKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 1367eaba73538b443436178c6112f33fbc81249c..558cfa2172fe7aa71491af2a59fe6720977fffeb 100644 (file)
@@ -141,7 +141,7 @@ gbt_macad_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -153,7 +153,7 @@ gbt_macad_union(PG_FUNCTION_ARGS)
        void       *out = palloc0(sizeof(macKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(macKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 9676e5a15bd116c3938349e449856eacaa4e367f..5d0c5509f5169e68cd40db89ba19f65dd5d6a9cd 100644 (file)
@@ -141,7 +141,7 @@ gbt_macad8_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -153,7 +153,7 @@ gbt_macad8_union(PG_FUNCTION_ARGS)
        void       *out = palloc0(sizeof(mac8KEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(mac8KEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 35e466cdd9423a1f43ca68d082b11ddff7753f82..d533648a295a8d142ef724ddd4d1416d2c6b8551 100644 (file)
@@ -108,7 +108,7 @@ Datum
 gbt_numeric_consistent(PG_FUNCTION_ARGS)
 {
        GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-       void       *query = (void *) DatumGetNumeric(PG_GETARG_DATUM(1));
+       void       *query = DatumGetNumeric(PG_GETARG_DATUM(1));
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
 
        /* Oid          subtype = PG_GETARG_OID(3); */
index 3cc7d4245d42b410f15bb4c3ab4500132d46738b..d1976f4f0910d02a2022a8bd94dd747475b23839 100644 (file)
@@ -151,7 +151,7 @@ gbt_oid_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -169,7 +169,7 @@ gbt_oid_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -181,7 +181,7 @@ gbt_oid_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(oidKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(oidKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index 28d6b5c9c2bb1d163bdbae7269393b20af575e0f..8f80f54240f8f2369f8c303c128d336420ee339f 100644 (file)
@@ -193,7 +193,7 @@ Datum
 gbt_text_consistent(PG_FUNCTION_ARGS)
 {
        GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-       void       *query = (void *) DatumGetTextP(PG_GETARG_DATUM(1));
+       void       *query = DatumGetTextP(PG_GETARG_DATUM(1));
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
 
        /* Oid          subtype = PG_GETARG_OID(3); */
@@ -221,7 +221,7 @@ Datum
 gbt_bpchar_consistent(PG_FUNCTION_ARGS)
 {
        GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-       void       *query = (void *) DatumGetTextP(PG_GETARG_DATUM(1));
+       void       *query = DatumGetTextP(PG_GETARG_DATUM(1));
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
 
        /* Oid          subtype = PG_GETARG_OID(3); */
index 3034bbb456bc99eecc08e53571a7e7129e9bbcfe..2f7859340f641a3f1344aa6328922589565daf1a 100644 (file)
@@ -216,7 +216,7 @@ gbt_time_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -233,7 +233,7 @@ gbt_time_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -258,7 +258,7 @@ gbt_timetz_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &qqq, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -270,7 +270,7 @@ gbt_time_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(timeKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(timeKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index b3cf2d6f60debc61da41f7498c678a86d70d5fe4..9e0d979dda98916150da7c1d64250a31f6c1df25 100644 (file)
@@ -265,7 +265,7 @@ gbt_ts_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -282,7 +282,7 @@ gbt_ts_distance(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &query, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &query, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -306,7 +306,7 @@ gbt_tstz_consistent(PG_FUNCTION_ARGS)
        key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
        qqq = tstz_to_ts_gmt(query);
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &qqq, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, &qqq, &strategy,
                                                                          GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }
 
@@ -325,7 +325,7 @@ gbt_tstz_distance(PG_FUNCTION_ARGS)
        key.upper = (GBT_NUMKEY *) &kkk[MAXALIGN(tinfo.size)];
        qqq = tstz_to_ts_gmt(query);
 
-       PG_RETURN_FLOAT8(gbt_num_distance(&key, (void *) &qqq, GIST_LEAF(entry),
+       PG_RETURN_FLOAT8(gbt_num_distance(&key, &qqq, GIST_LEAF(entry),
                                                                          &tinfo, fcinfo->flinfo));
 }
 
@@ -337,7 +337,7 @@ gbt_ts_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(tsKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(tsKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 
index fe8c679cbed636f509de26b3a5c4e1549845001a..f4c5c6e58929e92804d647059b9d2ea65f3f4532 100644 (file)
@@ -148,7 +148,7 @@ gbt_uuid_consistent(PG_FUNCTION_ARGS)
        key.lower = (GBT_NUMKEY *) &kkk->lower;
        key.upper = (GBT_NUMKEY *) &kkk->upper;
 
-       PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) query, &strategy,
+       PG_RETURN_BOOL(gbt_num_consistent(&key, query, &strategy,
                                                                          GIST_LEAF(entry), &tinfo,
                                                                          fcinfo->flinfo));
 }
@@ -160,7 +160,7 @@ gbt_uuid_union(PG_FUNCTION_ARGS)
        void       *out = palloc(sizeof(uuidKEY));
 
        *(int *) PG_GETARG_POINTER(1) = sizeof(uuidKEY);
-       PG_RETURN_POINTER(gbt_num_union((void *) out, entryvec, &tinfo, fcinfo->flinfo));
+       PG_RETURN_POINTER(gbt_num_union(out, entryvec, &tinfo, fcinfo->flinfo));
 }
 
 /*
index 9e2896f32ae26524cc7217c970d803f98647ae41..1c81a7c073d92adc8e1139858b1ef6724834b21a 100644 (file)
@@ -531,7 +531,7 @@ fileGetForeignRelSize(PlannerInfo *root,
                                   &fdw_private->filename,
                                   &fdw_private->is_program,
                                   &fdw_private->options);
-       baserel->fdw_private = (void *) fdw_private;
+       baserel->fdw_private = fdw_private;
 
        /* Estimate relation size */
        estimate_size(root, baserel, fdw_private);
@@ -713,7 +713,7 @@ fileBeginForeignScan(ForeignScanState *node, int eflags)
        festate->options = options;
        festate->cstate = cstate;
 
-       node->fdw_state = (void *) festate;
+       node->fdw_state = festate;
 }
 
 /*
@@ -734,7 +734,7 @@ fileIterateForeignScan(ForeignScanState *node)
 
        /* Set up callback to identify error line number. */
        errcallback.callback = CopyFromErrorCallback;
-       errcallback.arg = (void *) cstate;
+       errcallback.arg = cstate;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1228,7 +1228,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
 
        /* Set up callback to identify error line number. */
        errcallback.callback = CopyFromErrorCallback;
-       errcallback.arg = (void *) cstate;
+       errcallback.arg = cstate;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
index 0d4ec16d1e5401ebbbd9d414798dc667e078e83e..5e57eceffc8179b01bb1076236eee0befc209673 100644 (file)
@@ -858,7 +858,7 @@ setup_firstcall(FuncCallContext *funcctx, HStore *hs,
        st = (HStore *) palloc(VARSIZE(hs));
        memcpy(st, hs, VARSIZE(hs));
 
-       funcctx->user_fctx = (void *) st;
+       funcctx->user_fctx = st;
 
        if (fcinfo)
        {
index 8cf02c0e5da6b3057897a59c1a880deebc23362b..2b2c3f4029ec5cb887bdc6b01439b15271483bbf 100644 (file)
@@ -298,7 +298,7 @@ bool
 signconsistent(QUERYTYPE *query, BITVECP sign, int siglen, bool calcnot)
 {
        return execute(GETQUERY(query) + query->size - 1,
-                                  (void *) sign, (void *) (intptr_t) siglen, calcnot,
+                                  sign, (void *) (intptr_t) siglen, calcnot,
                                   checkcondition_bit);
 }
 
@@ -312,7 +312,7 @@ execconsistent(QUERYTYPE *query, ArrayType *array, bool calcnot)
        chkval.arrb = ARRPTR(array);
        chkval.arre = chkval.arrb + ARRNELEMS(array);
        return execute(GETQUERY(query) + query->size - 1,
-                                  (void *) &chkval, NULL, calcnot,
+                                  &chkval, NULL, calcnot,
                                   checkcondition_arr);
 }
 
@@ -354,7 +354,7 @@ gin_bool_consistent(QUERYTYPE *query, bool *check)
        }
 
        return execute(GETQUERY(query) + query->size - 1,
-                                  (void *) &gcv, NULL, true,
+                                  &gcv, NULL, true,
                                   checkcondition_gin);
 }
 
index e89a39a5b5f25377e8b942204d53091adfefcc46..286ad24fbe847987e8c77d1f396446ecbc224e80 100644 (file)
@@ -506,7 +506,7 @@ Datum
 _ltree_consistent(PG_FUNCTION_ARGS)
 {
        GISTENTRY  *entry = (GISTENTRY *) PG_GETARG_POINTER(0);
-       void       *query = (void *) PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
+       void       *query = PG_DETOAST_DATUM(PG_GETARG_DATUM(1));
        StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2);
 
        /* Oid          subtype = PG_GETARG_OID(3); */
index 2fdb5ea97bf40a644f161ddbb9f59672bd990b2e..b4a8097328d3a9141a9d246f3ea8ecb7d97b1b97 100644 (file)
@@ -73,7 +73,7 @@ _ltree_isparent(PG_FUNCTION_ARGS)
 {
        ArrayType  *la = PG_GETARG_ARRAYTYPE_P(0);
        ltree      *query = PG_GETARG_LTREE_P(1);
-       bool            res = array_iterator(la, ltree_isparent, (void *) query, NULL);
+       bool            res = array_iterator(la, ltree_isparent, query, NULL);
 
        PG_FREE_IF_COPY(la, 0);
        PG_FREE_IF_COPY(query, 1);
@@ -94,7 +94,7 @@ _ltree_risparent(PG_FUNCTION_ARGS)
 {
        ArrayType  *la = PG_GETARG_ARRAYTYPE_P(0);
        ltree      *query = PG_GETARG_LTREE_P(1);
-       bool            res = array_iterator(la, ltree_risparent, (void *) query, NULL);
+       bool            res = array_iterator(la, ltree_risparent, query, NULL);
 
        PG_FREE_IF_COPY(la, 0);
        PG_FREE_IF_COPY(query, 1);
@@ -115,7 +115,7 @@ _ltq_regex(PG_FUNCTION_ARGS)
 {
        ArrayType  *la = PG_GETARG_ARRAYTYPE_P(0);
        lquery     *query = PG_GETARG_LQUERY_P(1);
-       bool            res = array_iterator(la, ltq_regex, (void *) query, NULL);
+       bool            res = array_iterator(la, ltq_regex, query, NULL);
 
        PG_FREE_IF_COPY(la, 0);
        PG_FREE_IF_COPY(query, 1);
@@ -151,7 +151,7 @@ _lt_q_regex(PG_FUNCTION_ARGS)
 
        while (num > 0)
        {
-               if (array_iterator(_tree, ltq_regex, (void *) query, NULL))
+               if (array_iterator(_tree, ltq_regex, query, NULL))
                {
                        res = true;
                        break;
@@ -180,7 +180,7 @@ _ltxtq_exec(PG_FUNCTION_ARGS)
 {
        ArrayType  *la = PG_GETARG_ARRAYTYPE_P(0);
        ltxtquery  *query = PG_GETARG_LTXTQUERY_P(1);
-       bool            res = array_iterator(la, ltxtq_exec, (void *) query, NULL);
+       bool            res = array_iterator(la, ltxtq_exec, query, NULL);
 
        PG_FREE_IF_COPY(la, 0);
        PG_FREE_IF_COPY(query, 1);
@@ -205,7 +205,7 @@ _ltree_extract_isparent(PG_FUNCTION_ARGS)
        ltree      *found,
                           *item;
 
-       if (!array_iterator(la, ltree_isparent, (void *) query, &found))
+       if (!array_iterator(la, ltree_isparent, query, &found))
        {
                PG_FREE_IF_COPY(la, 0);
                PG_FREE_IF_COPY(query, 1);
@@ -228,7 +228,7 @@ _ltree_extract_risparent(PG_FUNCTION_ARGS)
        ltree      *found,
                           *item;
 
-       if (!array_iterator(la, ltree_risparent, (void *) query, &found))
+       if (!array_iterator(la, ltree_risparent, query, &found))
        {
                PG_FREE_IF_COPY(la, 0);
                PG_FREE_IF_COPY(query, 1);
@@ -251,7 +251,7 @@ _ltq_extract_regex(PG_FUNCTION_ARGS)
        ltree      *found,
                           *item;
 
-       if (!array_iterator(la, ltq_regex, (void *) query, &found))
+       if (!array_iterator(la, ltq_regex, query, &found))
        {
                PG_FREE_IF_COPY(la, 0);
                PG_FREE_IF_COPY(query, 1);
@@ -274,7 +274,7 @@ _ltxtq_extract_exec(PG_FUNCTION_ARGS)
        ltree      *found,
                           *item;
 
-       if (!array_iterator(la, ltxtq_exec, (void *) query, &found))
+       if (!array_iterator(la, ltxtq_exec, query, &found))
        {
                PG_FREE_IF_COPY(la, 0);
                PG_FREE_IF_COPY(query, 1);
index 9ef2e38560a2b1a339f101f299a5fa12fa791bb2..7f482f958fd2fc1c4dfac7ce7ba5087f90661116 100644 (file)
@@ -299,7 +299,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS)
 
                if (cache)
                        pfree(cache);
-               fcinfo->flinfo->fn_extra = (void *) newcache;
+               fcinfo->flinfo->fn_extra = newcache;
                cache = newcache;
        }
 
index 26454bc3e291202cd641200a2c500c558a482be7..448db331a0f1e7e2f4b14e0a547ce385f4100b69 100644 (file)
@@ -203,7 +203,7 @@ px_find_digest(const char *name, PX_MD **res)
        h->update = digest_update;
        h->finish = digest_finish;
        h->free = digest_free;
-       h->p.ptr = (void *) digest;
+       h->p.ptr = digest;
 
        *res = h;
        return 0;
index 53733d642d0a5f1811acc8d1a5ba1a85e06acfa6..c0810fbd7c87f5b16f358fda536faf22dbbd5e2e 100644 (file)
@@ -630,7 +630,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
         * functions.
         */
        fpinfo = (PgFdwRelationInfo *) palloc0(sizeof(PgFdwRelationInfo));
-       baserel->fdw_private = (void *) fpinfo;
+       baserel->fdw_private = fpinfo;
 
        /* Base foreign tables need to be pushed down always. */
        fpinfo->pushdown_safe = true;
@@ -1132,7 +1132,7 @@ postgresGetForeignPaths(PlannerInfo *root,
                        clauses = generate_implied_equalities_for_column(root,
                                                                                                                         baserel,
                                                                                                                         ec_member_matches_foreign,
-                                                                                                                        (void *) &arg,
+                                                                                                                        &arg,
                                                                                                                         baserel->lateral_referencers);
 
                        /* Done if there are no more expressions in the foreign rel */
@@ -1514,7 +1514,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
         * We'll save private state in node->fdw_state.
         */
        fsstate = (PgFdwScanState *) palloc0(sizeof(PgFdwScanState));
-       node->fdw_state = (void *) fsstate;
+       node->fdw_state = fsstate;
 
        /*
         * Identify which user to do the remote access as.  This should match what
@@ -2664,7 +2664,7 @@ postgresBeginDirectModify(ForeignScanState *node, int eflags)
         * We'll save private state in node->fdw_state.
         */
        dmstate = (PgFdwDirectModifyState *) palloc0(sizeof(PgFdwDirectModifyState));
-       node->fdw_state = (void *) dmstate;
+       node->fdw_state = dmstate;
 
        /*
         * Identify which user to do the remote access as.  This should match what
@@ -7618,7 +7618,7 @@ make_tuple_from_result_row(PGresult *res,
        errpos.rel = rel;
        errpos.fsstate = fsstate;
        errcallback.callback = conversion_error_callback;
-       errcallback.arg = (void *) &errpos;
+       errcallback.arg = &errpos;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
index c0b978119ac8692f5d3f3d4142882c5cd44cb023..3aedec882cda58a42e615e2556267bc00870f506 100644 (file)
@@ -1222,7 +1222,7 @@ brinbuild(Relation heap, Relation index, IndexInfo *indexInfo)
                 * generate summary for the same range twice).
                 */
                reltuples = table_index_build_scan(heap, index, indexInfo, false, true,
-                                                                                  brinbuildCallback, (void *) state, NULL);
+                                                                                  brinbuildCallback, state, NULL);
 
                /*
                 * process the final batch
@@ -1808,7 +1808,7 @@ summarize_range(IndexInfo *indexInfo, BrinBuildState *state, Relation heapRel,
        state->bs_currRangeStart = heapBlk;
        table_index_build_range_scan(heapRel, state->bs_irel, indexInfo, false, true, false,
                                                                 heapBlk, scanNumBlks,
-                                                                brinbuildCallback, (void *) state, NULL);
+                                                                brinbuildCallback, state, NULL);
 
        /*
         * Now we update the values obtained by the scan with the placeholder
index e5d95de5d84a7434ee7556e30c951d04b65d6001..edb749f585b09e8dab4b50c1a09ef37d1da500ee 100644 (file)
@@ -413,7 +413,7 @@ AssertCheckRanges(Ranges *ranges, FmgrInfo *cmpFn, Oid colloid)
 
                        Assert(bsearch_arg(&value, &ranges->values[2 * ranges->nranges],
                                                           ranges->nsorted, sizeof(Datum),
-                                                          compare_values, (void *) &cxt) == NULL);
+                                                          compare_values, &cxt) == NULL);
                }
        }
 #endif
@@ -550,7 +550,7 @@ range_deduplicate_values(Ranges *range)
                /* same as preceding value, so store it */
                if (compare_values(&range->values[start + i - 1],
                                                   &range->values[start + i],
-                                                  (void *) &cxt) == 0)
+                                                  &cxt) == 0)
                        continue;
 
                range->values[start + n] = range->values[start + i];
@@ -1085,7 +1085,7 @@ range_contains_value(BrinDesc *bdesc, Oid colloid,
 
                if (bsearch_arg(&newval, &ranges->values[2 * ranges->nranges],
                                                ranges->nsorted, sizeof(Datum),
-                                               compare_values, (void *) &cxt) != NULL)
+                                               compare_values, &cxt) != NULL)
                        return true;
        }
        else
@@ -1206,7 +1206,7 @@ sort_expanded_ranges(FmgrInfo *cmp, Oid colloid,
        for (i = 1; i < neranges; i++)
        {
                /* if the current range is equal to the preceding one, do nothing */
-               if (!compare_expanded_ranges(&eranges[i - 1], &eranges[i], (void *) &cxt))
+               if (!compare_expanded_ranges(&eranges[i - 1], &eranges[i], &cxt))
                        continue;
 
                /* otherwise, copy it to n-th place (if not already there) */
index 3547cdba56eaef44925520c4e016c635b319c84d..d92e68338491bb2768e56d00d98a827219a42db2 100644 (file)
@@ -88,7 +88,7 @@ detoast_external_attr(struct varlena *attr)
                eoh = DatumGetEOHP(PointerGetDatum(attr));
                resultsize = EOH_get_flat_size(eoh);
                result = (struct varlena *) palloc(resultsize);
-               EOH_flatten_into(eoh, (void *) result, resultsize);
+               EOH_flatten_into(eoh, result, resultsize);
        }
        else
        {
index 7f89cd5e8261e844c8ec831b495bfc442ebfc4cd..f08b66ab7914f3e2beb3ded8f0de8399bf685e3b 100644 (file)
@@ -117,7 +117,7 @@ ginInitBA(BuildAccumulator *accum)
                                                         ginCombineData,
                                                         ginAllocEntryAccumulator,
                                                         NULL,  /* no freefunc needed */
-                                                        (void *) accum);
+                                                        accum);
 }
 
 /*
index 71f38be90c3b1d0c086caa4711a6271809e54068..31ee5650417b06c9a6292d3b3396e3d117871ad1 100644 (file)
@@ -380,8 +380,7 @@ ginbuild(Relation heap, Relation index, IndexInfo *indexInfo)
         * prefers to receive tuples in TID order.
         */
        reltuples = table_index_build_scan(heap, index, indexInfo, false, true,
-                                                                          ginBuildCallback, (void *) &buildstate,
-                                                                          NULL);
+                                                                          ginBuildCallback, &buildstate, NULL);
 
        /* dump remaining entries to the index */
        oldCtx = MemoryContextSwitchTo(buildstate.tmpCtx);
@@ -497,7 +496,7 @@ gininsert(Relation index, Datum *values, bool *isnull,
                oldCtx = MemoryContextSwitchTo(indexInfo->ii_Context);
                ginstate = (GinState *) palloc(sizeof(GinState));
                initGinState(ginstate, index);
-               indexInfo->ii_AmCache = (void *) ginstate;
+               indexInfo->ii_AmCache = ginstate;
                MemoryContextSwitchTo(oldCtx);
        }
 
index 83b819f1a5377afae9bc62c04e409dd70061b518..ebc65449c1bb7eb9b49e6930d9d3137568163419 100644 (file)
@@ -173,7 +173,7 @@ gistinsert(Relation r, Datum *values, bool *isnull,
                oldCxt = MemoryContextSwitchTo(indexInfo->ii_Context);
                giststate = initGISTstate(r);
                giststate->tempCxt = createTempGistContext();
-               indexInfo->ii_AmCache = (void *) giststate;
+               indexInfo->ii_AmCache = giststate;
                MemoryContextSwitchTo(oldCxt);
        }
 
index ba06df30fafeb8da253e1c42cc9211230a8649c2..63d1914b37f6f9bff641535dd8efc85e2fb3d4aa 100644 (file)
@@ -273,7 +273,7 @@ gistbuild(Relation heap, Relation index, IndexInfo *indexInfo)
                /* Scan the table, adding all tuples to the tuplesort */
                reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
                                                                                   gistSortedBuildCallback,
-                                                                                  (void *) &buildstate, NULL);
+                                                                                  &buildstate, NULL);
 
                /*
                 * Perform the sort and build index pages.
@@ -312,7 +312,7 @@ gistbuild(Relation heap, Relation index, IndexInfo *indexInfo)
                /* Scan the table, inserting all the tuples to the index. */
                reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
                                                                                   gistBuildCallback,
-                                                                                  (void *) &buildstate, NULL);
+                                                                                  &buildstate, NULL);
 
                /*
                 * If buffering was used, flush out all the tuples that are still in
index 5ce36093943c19daee20916eade102fc5acd01b2..42c73ea5eb9778d39009f1c5b3677d3c19a1dc1b 100644 (file)
@@ -173,7 +173,7 @@ hashbuild(Relation heap, Relation index, IndexInfo *indexInfo)
        /* do the heap scan */
        reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
                                                                           hashbuildCallback,
-                                                                          (void *) &buildstate, NULL);
+                                                                          &buildstate, NULL);
        pgstat_progress_update_param(PROGRESS_CREATEIDX_TUPLES_TOTAL,
                                                                 buildstate.indtuples);
 
index 793bd33cb4d9ad1ec54674448197986be0740721..485644f12d1519fed7dda4b20fb52514cd490251 100644 (file)
@@ -2453,7 +2453,7 @@ lazy_vacuum_one_index(Relation indrel, IndexBulkDeleteResult *istat,
                                                         InvalidBlockNumber, InvalidOffsetNumber);
 
        /* Do bulk deletion */
-       istat = vac_bulkdel_one_index(&ivinfo, istat, (void *) vacrel->dead_items,
+       istat = vac_bulkdel_one_index(&ivinfo, istat, vacrel->dead_items,
                                                                  vacrel->dead_items_info);
 
        /* Revert to the previous phase information for error traceback */
index dd76fe1da909cd56dd60fb1a2db081de9c5b5343..77afa148942593e09b838280e7e784f9ad781ced 100644 (file)
@@ -566,7 +566,7 @@ btparallelrescan(IndexScanDesc scan)
 
        Assert(parallel_scan);
 
-       btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+       btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
                                                                                                  parallel_scan->ps_offset);
 
        /*
@@ -644,7 +644,7 @@ _bt_parallel_seize(IndexScanDesc scan, BlockNumber *next_scan_page,
                        return false;
        }
 
-       btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+       btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
                                                                                                  parallel_scan->ps_offset);
 
        while (1)
@@ -752,7 +752,7 @@ _bt_parallel_release(IndexScanDesc scan, BlockNumber next_scan_page,
 
        Assert(BlockNumberIsValid(next_scan_page));
 
-       btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+       btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
                                                                                                  parallel_scan->ps_offset);
 
        SpinLockAcquire(&btscan->btps_mutex);
@@ -791,7 +791,7 @@ _bt_parallel_done(IndexScanDesc scan)
        if (so->needPrimScan)
                return;
 
-       btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+       btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
                                                                                                  parallel_scan->ps_offset);
 
        /*
@@ -829,7 +829,7 @@ _bt_parallel_primscan_schedule(IndexScanDesc scan, BlockNumber curr_page)
 
        Assert(so->numArrayKeys);
 
-       btscan = (BTParallelScanDesc) OffsetToPointer((void *) parallel_scan,
+       btscan = (BTParallelScanDesc) OffsetToPointer(parallel_scan,
                                                                                                  parallel_scan->ps_offset);
 
        SpinLockAcquire(&btscan->btps_mutex);
index fb9a05f7af1d1431e6b93c843d08cc2ee457a9ec..17a352d040cd1c44a05198fa8a1284f1c7647a83 100644 (file)
@@ -475,7 +475,7 @@ _bt_spools_heapscan(Relation heap, Relation index, BTBuildState *buildstate,
        /* Fill spool using either serial or parallel heap scan */
        if (!buildstate->btleader)
                reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
-                                                                                  _bt_build_callback, (void *) buildstate,
+                                                                                  _bt_build_callback, buildstate,
                                                                                   NULL);
        else
                reltuples = _bt_parallel_heapscan(buildstate,
@@ -1930,7 +1930,7 @@ _bt_parallel_scan_and_sort(BTSpool *btspool, BTSpool *btspool2,
                                                                        ParallelTableScanFromBTShared(btshared));
        reltuples = table_index_build_scan(btspool->heap, btspool->index, indexInfo,
                                                                           true, progress, _bt_build_callback,
-                                                                          (void *) &buildstate, scan);
+                                                                          &buildstate, scan);
 
        /* Execute this worker's part of the sort */
        if (progress)
index 1bec19c2b88f7fe1879f05cc4c58baca215ef4b2..305ced4dea717f278c960041571bb1a8f70a65a8 100644 (file)
@@ -122,7 +122,7 @@ spgbuild(Relation heap, Relation index, IndexInfo *indexInfo)
                                                                                          ALLOCSET_DEFAULT_SIZES);
 
        reltuples = table_index_build_scan(heap, index, indexInfo, true, true,
-                                                                          spgistBuildCallback, (void *) &buildstate,
+                                                                          spgistBuildCallback, &buildstate,
                                                                           NULL);
 
        MemoryContextDelete(buildstate.tmpCtx);
index 72b7661971fb57d2575f91cea9fa933d99b8de7c..e93d9869b27df58664c996e64a63cc99b5fab812 100644 (file)
@@ -279,7 +279,7 @@ spgGetCache(Relation index)
                        UnlockReleaseBuffer(metabuffer);
                }
 
-               index->rd_amcache = (void *) cache;
+               index->rd_amcache = cache;
        }
        else
        {
index 23dd0c6ef6eb4091e866d7635480e5e8e5bd15cc..49be1df91c1102a54fb7a11e5c536c9f0d52ba4b 100644 (file)
@@ -747,7 +747,7 @@ pg_prepared_xact(PG_FUNCTION_ARGS)
                 * out as a result set.
                 */
                status = (Working_State *) palloc(sizeof(Working_State));
-               funcctx->user_fctx = (void *) status;
+               funcctx->user_fctx = status;
 
                status->ngxacts = GetPreparedTransactionList(&status->array);
                status->currIdx = 0;
@@ -1707,8 +1707,7 @@ ProcessRecords(char *bufptr, TransactionId xid,
                bufptr += MAXALIGN(sizeof(TwoPhaseRecordOnDisk));
 
                if (callbacks[record->rmid] != NULL)
-                       callbacks[record->rmid] (xid, record->info,
-                                                                        (void *) bufptr, record->len);
+                       callbacks[record->rmid] (xid, record->info, bufptr, record->len);
 
                bufptr += MAXALIGN(record->len);
        }
index 3943c357fa40f13c8fad92486b0eb2cfa504f471..c6994b78282a94c729cef11d55dc2f963e96678d 100644 (file)
@@ -1913,7 +1913,7 @@ ApplyWalRecord(XLogReaderState *xlogreader, XLogRecord *record, TimeLineID *repl
 
        /* Setup error traceback support for ereport() */
        errcallback.callback = rm_redo_error_callback;
-       errcallback.arg = (void *) xlogreader;
+       errcallback.arg = xlogreader;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -4821,7 +4821,7 @@ check_recovery_target_lsn(char **newval, void **extra, GucSource source)
 
                myextra = (XLogRecPtr *) guc_malloc(ERROR, sizeof(XLogRecPtr));
                *myextra = lsn;
-               *extra = (void *) myextra;
+               *extra = myextra;
        }
        return true;
 }
@@ -4985,7 +4985,7 @@ check_recovery_target_timeline(char **newval, void **extra, GucSource source)
 
        myextra = (RecoveryTargetTimeLineGoal *) guc_malloc(ERROR, sizeof(RecoveryTargetTimeLineGoal));
        *myextra = rttg;
-       *extra = (void *) myextra;
+       *extra = myextra;
 
        return true;
 }
@@ -5021,7 +5021,7 @@ check_recovery_target_xid(char **newval, void **extra, GucSource source)
 
                myextra = (TransactionId *) guc_malloc(ERROR, sizeof(TransactionId));
                *myextra = xid;
-               *extra = (void *) myextra;
+               *extra = myextra;
        }
        return true;
 }
index 0489cbabcb8a9a2c8b394c694308503cf1046d7b..2afc550540c227da164e099b3ef280fc6a2e74d0 100644 (file)
@@ -2240,7 +2240,7 @@ find_expr_references_walker(Node *node,
                context->rtables = lcons(query->rtable, context->rtables);
                result = query_tree_walker(query,
                                                                   find_expr_references_walker,
-                                                                  (void *) context,
+                                                                  context,
                                                                   QTW_IGNORE_JOINALIASES |
                                                                   QTW_EXAMINE_SORTGROUP);
                context->rtables = list_delete_first(context->rtables);
@@ -2310,7 +2310,7 @@ find_expr_references_walker(Node *node,
        }
 
        return expression_tree_walker(node, find_expr_references_walker,
-                                                                 (void *) context);
+                                                                 context);
 }
 
 /*
index 003af4bf21c5e70b118f3b1983de4333a2cbba67..d7b88b61dccc0c8f94e2ffc47ec9260f76c996da 100644 (file)
@@ -3118,7 +3118,7 @@ check_nested_generated_walker(Node *node, void *context)
        }
        else
                return expression_tree_walker(node, check_nested_generated_walker,
-                                                                         (void *) context);
+                                                                         context);
 }
 
 static void
index f9bb721c5fe27aab677052bf2e7c62476cdd7b29..1c3a9e06d37b9bfce737c3259c95d6dec14dc25a 100644 (file)
@@ -3395,7 +3395,7 @@ validate_index(Oid heapId, Oid indexId, Snapshot snapshot)
 
        /* ambulkdelete updates progress metrics */
        (void) index_bulk_delete(&ivinfo, NULL,
-                                                        validate_index_callback, (void *) &state);
+                                                        validate_index_callback, &state);
 
        /* Execute the sort */
        {
index 0e606ddd895f37da58ef37a859b19432b267ca1d..39b180ddf500e9b7ed04c03c304c2047514d259c 100644 (file)
@@ -42,7 +42,7 @@ RunObjectPostCreateHook(Oid classId, Oid objectId, int subId,
 
        (*object_access_hook) (OAT_POST_CREATE,
                                                   classId, objectId, subId,
-                                                  (void *) &pc_arg);
+                                                  &pc_arg);
 }
 
 /*
@@ -64,7 +64,7 @@ RunObjectDropHook(Oid classId, Oid objectId, int subId,
 
        (*object_access_hook) (OAT_DROP,
                                                   classId, objectId, subId,
-                                                  (void *) &drop_arg);
+                                                  &drop_arg);
 }
 
 /*
@@ -103,7 +103,7 @@ RunObjectPostAlterHook(Oid classId, Oid objectId, int subId,
 
        (*object_access_hook) (OAT_POST_ALTER,
                                                   classId, objectId, subId,
-                                                  (void *) &pa_arg);
+                                                  &pa_arg);
 }
 
 /*
@@ -125,7 +125,7 @@ RunNamespaceSearchHook(Oid objectId, bool ereport_on_violation)
 
        (*object_access_hook) (OAT_NAMESPACE_SEARCH,
                                                   NamespaceRelationId, objectId, 0,
-                                                  (void *) &ns_arg);
+                                                  &ns_arg);
 
        return ns_arg.result;
 }
@@ -168,7 +168,7 @@ RunObjectPostCreateHookStr(Oid classId, const char *objectName, int subId,
 
        (*object_access_hook_str) (OAT_POST_CREATE,
                                                           classId, objectName, subId,
-                                                          (void *) &pc_arg);
+                                                          &pc_arg);
 }
 
 /*
@@ -190,7 +190,7 @@ RunObjectDropHookStr(Oid classId, const char *objectName, int subId,
 
        (*object_access_hook_str) (OAT_DROP,
                                                           classId, objectName, subId,
-                                                          (void *) &drop_arg);
+                                                          &drop_arg);
 }
 
 /*
@@ -229,7 +229,7 @@ RunObjectPostAlterHookStr(Oid classId, const char *objectName, int subId,
 
        (*object_access_hook_str) (OAT_POST_ALTER,
                                                           classId, objectName, subId,
-                                                          (void *) &pa_arg);
+                                                          &pa_arg);
 }
 
 /*
@@ -251,7 +251,7 @@ RunNamespaceSearchHookStr(const char *objectName, bool ereport_on_violation)
 
        (*object_access_hook_str) (OAT_NAMESPACE_SEARCH,
                                                           NamespaceRelationId, objectName, 0,
-                                                          (void *) &ns_arg);
+                                                          &ns_arg);
 
        return ns_arg.result;
 }
index 528c17cd7f6767b87268ddb3bf2b023ae4465f18..79a6db08c45e6545297b07bbde1c3f1177611fd3 100644 (file)
@@ -873,7 +873,7 @@ fmgr_sql_validator(PG_FUNCTION_ARGS)
                callback_arg.prosrc = prosrc;
 
                sqlerrcontext.callback = sql_function_parse_error_callback;
-               sqlerrcontext.arg = (void *) &callback_arg;
+               sqlerrcontext.arg = &callback_arg;
                sqlerrcontext.previous = error_context_stack;
                error_context_stack = &sqlerrcontext;
 
index 09e2dbdd10a951ef53822258ab0ae2847669bf0b..9bbb60463f4ce9c11b1253ea1dfed0836bd10e51 100644 (file)
@@ -1202,7 +1202,7 @@ pg_get_publication_tables(PG_FUNCTION_ARGS)
                                                   PG_NODE_TREEOID, -1, 0);
 
                funcctx->tuple_desc = BlessTupleDesc(tupdesc);
-               funcctx->user_fctx = (void *) table_infos;
+               funcctx->user_fctx = table_infos;
 
                MemoryContextSwitchTo(oldcontext);
        }
index 754cb4961697f0b741c7e5bc0b73898f66fc08d2..4d52c93c30199a4b94cf570a18566d2cb751605a 100644 (file)
@@ -959,7 +959,7 @@ CopyFrom(CopyFromState cstate)
 
        /* Set up callback to identify error line number */
        errcallback.callback = CopyFromErrorCallback;
-       errcallback.arg = (void *) cstate;
+       errcallback.arg = cstate;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
index cf61bbac1fa104f197361d1c20420ed5374aa603..dd1489518c31197244401d015600ccdee7a12574 100644 (file)
@@ -1532,7 +1532,7 @@ ImportForeignSchema(ImportForeignSchemaStmt *stmt)
                callback_arg.tablename = NULL;  /* not known yet */
                callback_arg.cmd = cmd;
                sqlerrcontext.callback = import_error_callback;
-               sqlerrcontext.arg = (void *) &callback_arg;
+               sqlerrcontext.arg = &callback_arg;
                sqlerrcontext.previous = error_context_stack;
                error_context_stack = &sqlerrcontext;
 
index d1134733c178d9e1517814b0ec48281305692459..4049ce1a10f650aa6d8e4b99f756f73beb862ace 100644 (file)
@@ -3344,7 +3344,7 @@ ReindexPartitions(const ReindexStmt *stmt, Oid relid, const ReindexParams *param
        errinfo.relnamespace = pstrdup(relnamespace);
        errinfo.relkind = relkind;
        errcallback.callback = reindex_error_callback;
-       errcallback.arg = (void *) &errinfo;
+       errcallback.arg = &errinfo;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
index cd20ae76badbc2a8a63734a4adb9c836f0e901a1..76d0b06183d17092d3695dcafdc69e5604180d20 100644 (file)
@@ -54,7 +54,7 @@ LockTableCommand(LockStmt *lockstmt)
                reloid = RangeVarGetRelidExtended(rv, lockstmt->mode,
                                                                                  lockstmt->nowait ? RVR_NOWAIT : 0,
                                                                                  RangeVarCallbackForLockTable,
-                                                                                 (void *) &lockstmt->mode);
+                                                                                 &lockstmt->mode);
 
                if (get_rel_relkind(reloid) == RELKIND_VIEW)
                        LockViewRecurse(reloid, lockstmt->mode, lockstmt->nowait, NIL);
index 6ff3eba8249d77a1c605cc8ccb32d30a564f7e10..7b7b3d72c55d6478e077cc41163e8f98dc9eaa29 100644 (file)
@@ -627,7 +627,7 @@ CreatePolicy(CreatePolicyStmt *stmt)
        table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
                                                                                0,
                                                                                RangeVarCallbackForPolicy,
-                                                                               (void *) stmt);
+                                                                               stmt);
 
        /* Open target_table to build quals. No additional lock is necessary. */
        target_table = relation_open(table_id, NoLock);
@@ -803,7 +803,7 @@ AlterPolicy(AlterPolicyStmt *stmt)
        table_id = RangeVarGetRelidExtended(stmt->table, AccessExclusiveLock,
                                                                                0,
                                                                                RangeVarCallbackForPolicy,
-                                                                               (void *) stmt);
+                                                                               stmt);
 
        target_table = relation_open(table_id, NoLock);
 
@@ -1108,7 +1108,7 @@ rename_policy(RenameStmt *stmt)
        table_id = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
                                                                                0,
                                                                                RangeVarCallbackForPolicy,
-                                                                               (void *) stmt);
+                                                                               stmt);
 
        target_table = relation_open(table_id, NoLock);
 
index 0129db18c6ec974a1929841952f758f0a55b395f..031c84ec29f8d899b79f49862fae7ab248a2c383 100644 (file)
@@ -256,7 +256,7 @@ contain_invalid_rfcolumn_walker(Node *node, rf_context *context)
        }
 
        return expression_tree_walker(node, contain_invalid_rfcolumn_walker,
-                                                                 (void *) context);
+                                                                 context);
 }
 
 /*
@@ -570,7 +570,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
                if (exprType(node) >= FirstNormalObjectId)
                        errdetail_msg = _("User-defined types are not allowed.");
                else if (check_functions_in_node(node, contain_mutable_or_user_functions_checker,
-                                                                                (void *) pstate))
+                                                                                pstate))
                        errdetail_msg = _("User-defined or built-in mutable functions are not allowed.");
                else if (exprCollation(node) >= FirstNormalObjectId ||
                                 exprInputCollation(node) >= FirstNormalObjectId)
@@ -589,7 +589,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
                                 parser_errposition(pstate, exprLocation(node))));
 
        return expression_tree_walker(node, check_simple_rowfilter_expr_walker,
-                                                                 (void *) pstate);
+                                                                 pstate);
 }
 
 /*
index 1af2e2bffb28084cedec6a8f441e4d46b70cb116..6ccae4cb4a8613b0a93d4b38a752c7475e92029c 100644 (file)
@@ -1581,7 +1581,7 @@ RemoveRelations(DropStmt *drop)
 
                relOid = RangeVarGetRelidExtended(rel, lockmode, RVR_MISSING_OK,
                                                                                  RangeVarCallbackForDropRelation,
-                                                                                 (void *) &state);
+                                                                                 &state);
 
                /* Not there? */
                if (!OidIsValid(relOid))
@@ -4142,7 +4142,7 @@ RenameRelation(RenameStmt *stmt)
                relid = RangeVarGetRelidExtended(stmt->relation, lockmode,
                                                                                 stmt->missing_ok ? RVR_MISSING_OK : 0,
                                                                                 RangeVarCallbackForAlterRelation,
-                                                                                (void *) stmt);
+                                                                                stmt);
 
                if (!OidIsValid(relid))
                {
@@ -4390,7 +4390,7 @@ AlterTableLookupRelation(AlterTableStmt *stmt, LOCKMODE lockmode)
        return RangeVarGetRelidExtended(stmt->relation, lockmode,
                                                                        stmt->missing_ok ? RVR_MISSING_OK : 0,
                                                                        RangeVarCallbackForAlterRelation,
-                                                                       (void *) stmt);
+                                                                       stmt);
 }
 
 /*
@@ -17719,7 +17719,7 @@ AlterTableNamespace(AlterObjectSchemaStmt *stmt, Oid *oldschema)
        relid = RangeVarGetRelidExtended(stmt->relation, AccessExclusiveLock,
                                                                         stmt->missing_ok ? RVR_MISSING_OK : 0,
                                                                         RangeVarCallbackForAlterRelation,
-                                                                        (void *) stmt);
+                                                                        stmt);
 
        if (!OidIsValid(relid))
        {
@@ -20350,7 +20350,7 @@ ATExecAttachPartitionIdx(List **wqueue, Relation parentIdx, RangeVar *name)
        partIdxId =
                RangeVarGetRelidExtended(name, AccessExclusiveLock, 0,
                                                                 RangeVarCallbackForAttachIndex,
-                                                                (void *) &state);
+                                                                &state);
        /* Not there? */
        if (!OidIsValid(partIdxId))
                ereport(ERROR,
index 00c1ed19fdfd91cefcff0377bad6901690868efe..8ebbd935b0c616bff2c212ddc1c5f56edaaf3d70 100644 (file)
@@ -1290,7 +1290,7 @@ check_temp_tablespaces(char **newval, void **extra, GucSource source)
                        return false;
                myextra->numSpcs = numSpcs;
                memcpy(myextra->tblSpcs, tblSpcs, numSpcs * sizeof(Oid));
-               *extra = (void *) myextra;
+               *extra = myextra;
 
                pfree(tblSpcs);
        }
index 859e2191f08f35a572959225b0c398127bf451b0..971a8a1ebc5c06431d10563ce6d2aa39ab60cfb7 100644 (file)
@@ -3562,7 +3562,7 @@ domainAddCheckConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid,
        domVal->location = -1;          /* will be set when/if used */
 
        pstate->p_pre_columnref_hook = replace_domain_constraint_value;
-       pstate->p_ref_hook_state = (void *) domVal;
+       pstate->p_ref_hook_state = domVal;
 
        expr = transformExpr(pstate, constr->raw_expr, EXPR_KIND_DOMAIN_CHECK);
 
index 1862cfb94d9298316fc169c2a1ce63289f9fd2c6..bb639ef51fb2538a102ce7d2f9f3a6f14b3f310f 100644 (file)
@@ -2518,7 +2518,7 @@ vac_bulkdel_one_index(IndexVacuumInfo *ivinfo, IndexBulkDeleteResult *istat,
 {
        /* Do bulk deletion */
        istat = index_bulk_delete(ivinfo, istat, vac_tid_reaped,
-                                                         (void *) dead_items);
+                                                         dead_items);
 
        ereport(ivinfo->message_level,
                        (errmsg("scanned index \"%s\" to remove %lld row versions",
index 99462681925e749ac34d1c5d0b37752d60dcbde9..0ecff94d0ed1a9de8feb94ca8af06bf292a29528 100644 (file)
@@ -232,7 +232,7 @@ check_datestyle(char **newval, void **extra, GucSource source)
                return false;
        myextra[0] = newDateStyle;
        myextra[1] = newDateOrder;
-       *extra = (void *) myextra;
+       *extra = myextra;
 
        return true;
 }
@@ -901,7 +901,7 @@ check_session_authorization(char **newval, void **extra, GucSource source)
                return false;
        myextra->roleid = roleid;
        myextra->is_superuser = is_superuser;
-       *extra = (void *) myextra;
+       *extra = myextra;
 
        return true;
 }
@@ -1015,7 +1015,7 @@ check_role(char **newval, void **extra, GucSource source)
                return false;
        myextra->roleid = roleid;
        myextra->is_superuser = is_superuser;
-       *extra = (void *) myextra;
+       *extra = myextra;
 
        return true;
 }
index 69d36f70b3c0f801c994de8ba227323f90fd8dc7..e0eb96fd5ad9c82b09a8ea3539fa8ab262b34f11 100644 (file)
@@ -2916,8 +2916,7 @@ expr_setup_walker(Node *node, ExprSetupInfo *info)
                return false;
        if (IsA(node, GroupingFunc))
                return false;
-       return expression_tree_walker(node, expr_setup_walker,
-                                                                 (void *) info);
+       return expression_tree_walker(node, expr_setup_walker, info);
 }
 
 /*
index 42da9621789fa08a71882c4ac266e3a791399b9a..bad7b195bfb515629286b64ac4dc8c9c233cfc09 100644 (file)
@@ -281,44 +281,44 @@ ExecReadyInterpretedExpr(ExprState *state)
                if (step0 == EEOP_INNER_FETCHSOME &&
                        step1 == EEOP_INNER_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustInnerVar;
+                       state->evalfunc_private = ExecJustInnerVar;
                        return;
                }
                else if (step0 == EEOP_OUTER_FETCHSOME &&
                                 step1 == EEOP_OUTER_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustOuterVar;
+                       state->evalfunc_private = ExecJustOuterVar;
                        return;
                }
                else if (step0 == EEOP_SCAN_FETCHSOME &&
                                 step1 == EEOP_SCAN_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustScanVar;
+                       state->evalfunc_private = ExecJustScanVar;
                        return;
                }
                else if (step0 == EEOP_INNER_FETCHSOME &&
                                 step1 == EEOP_ASSIGN_INNER_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustAssignInnerVar;
+                       state->evalfunc_private = ExecJustAssignInnerVar;
                        return;
                }
                else if (step0 == EEOP_OUTER_FETCHSOME &&
                                 step1 == EEOP_ASSIGN_OUTER_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustAssignOuterVar;
+                       state->evalfunc_private = ExecJustAssignOuterVar;
                        return;
                }
                else if (step0 == EEOP_SCAN_FETCHSOME &&
                                 step1 == EEOP_ASSIGN_SCAN_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustAssignScanVar;
+                       state->evalfunc_private = ExecJustAssignScanVar;
                        return;
                }
                else if (step0 == EEOP_CASE_TESTVAL &&
                                 step1 == EEOP_FUNCEXPR_STRICT &&
                                 state->steps[0].d.casetest.value)
                {
-                       state->evalfunc_private = (void *) ExecJustApplyFuncToCase;
+                       state->evalfunc_private = ExecJustApplyFuncToCase;
                        return;
                }
        }
@@ -328,37 +328,37 @@ ExecReadyInterpretedExpr(ExprState *state)
 
                if (step0 == EEOP_CONST)
                {
-                       state->evalfunc_private = (void *) ExecJustConst;
+                       state->evalfunc_private = ExecJustConst;
                        return;
                }
                else if (step0 == EEOP_INNER_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustInnerVarVirt;
+                       state->evalfunc_private = ExecJustInnerVarVirt;
                        return;
                }
                else if (step0 == EEOP_OUTER_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustOuterVarVirt;
+                       state->evalfunc_private = ExecJustOuterVarVirt;
                        return;
                }
                else if (step0 == EEOP_SCAN_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustScanVarVirt;
+                       state->evalfunc_private = ExecJustScanVarVirt;
                        return;
                }
                else if (step0 == EEOP_ASSIGN_INNER_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustAssignInnerVarVirt;
+                       state->evalfunc_private = ExecJustAssignInnerVarVirt;
                        return;
                }
                else if (step0 == EEOP_ASSIGN_OUTER_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustAssignOuterVarVirt;
+                       state->evalfunc_private = ExecJustAssignOuterVarVirt;
                        return;
                }
                else if (step0 == EEOP_ASSIGN_SCAN_VAR)
                {
-                       state->evalfunc_private = (void *) ExecJustAssignScanVarVirt;
+                       state->evalfunc_private = ExecJustAssignScanVarVirt;
                        return;
                }
        }
@@ -379,7 +379,7 @@ ExecReadyInterpretedExpr(ExprState *state)
        state->flags |= EEO_FLAG_DIRECT_THREADED;
 #endif                                                 /* EEO_USE_COMPUTED_GOTO */
 
-       state->evalfunc_private = (void *) ExecInterpExpr;
+       state->evalfunc_private = ExecInterpExpr;
 }
 
 
@@ -2226,7 +2226,7 @@ get_cached_rowtype(Oid type_id, int32 typmod,
                                                (errcode(ERRCODE_WRONG_OBJECT_TYPE),
                                                 errmsg("type %s is not composite",
                                                                format_type_be(type_id))));
-                       rowcache->cacheptr = (void *) typentry;
+                       rowcache->cacheptr = typentry;
                        rowcache->tupdesc_id = typentry->tupDesc_identifier;
                        if (changed)
                                *changed = true;
@@ -2251,7 +2251,7 @@ get_cached_rowtype(Oid type_id, int32 typmod,
                        tupDesc = lookup_rowtype_tupdesc(type_id, typmod);
                        /* Drop pin acquired by lookup_rowtype_tupdesc */
                        ReleaseTupleDesc(tupDesc);
-                       rowcache->cacheptr = (void *) tupDesc;
+                       rowcache->cacheptr = tupDesc;
                        rowcache->tupdesc_id = 0;       /* not a valid value for non-RECORD */
                        if (changed)
                                *changed = true;
index f9a2fac79e4d310eba7789a1778ed2720941dd86..f0a5f8879a93266164a7e462e6d7799ab76adf11 100644 (file)
@@ -1130,7 +1130,7 @@ index_expression_changed_walker(Node *node, Bitmapset *allUpdatedCols)
        }
 
        return expression_tree_walker(node, index_expression_changed_walker,
-                                                                 (void *) allUpdatedCols);
+                                                                 allUpdatedCols);
 }
 
 /*
index 39880663307b07af3b722ea5a9993449cb250e24..8d1fda2ddc0032ac5ae386c7deb11a899c56f67e 100644 (file)
@@ -268,7 +268,7 @@ sql_fn_parser_setup(struct ParseState *pstate, SQLFunctionParseInfoPtr pinfo)
        pstate->p_post_columnref_hook = sql_fn_post_column_ref;
        pstate->p_paramref_hook = sql_fn_param_ref;
        /* no need to use p_coerce_param_hook */
-       pstate->p_ref_hook_state = (void *) pinfo;
+       pstate->p_ref_hook_state = pinfo;
 }
 
 /*
@@ -614,7 +614,7 @@ init_sql_fcache(FunctionCallInfo fcinfo, Oid collation, bool lazyEvalOK)
         */
        fcache = (SQLFunctionCachePtr) palloc0(sizeof(SQLFunctionCache));
        fcache->fcontext = fcontext;
-       finfo->fn_extra = (void *) fcache;
+       finfo->fn_extra = fcache;
 
        /*
         * get the procedure tuple corresponding to the given function Oid
index 53ead77ece8cb2ff0fc97c243259a4182efb7cc3..84d33fdebc64216b05c63ee1644d58d825f010ba 100644 (file)
@@ -1088,7 +1088,7 @@ finalize_aggregate(AggState *aggstate,
                InitFunctionCallInfoData(*fcinfo, &peragg->finalfn,
                                                                 numFinalArgs,
                                                                 pertrans->aggCollation,
-                                                                (void *) aggstate, NULL);
+                                                                (Node *) aggstate, NULL);
 
                /* Fill in the transition state value */
                fcinfo->args[0].value =
@@ -1440,12 +1440,11 @@ find_cols_walker(Node *node, FindColsContext *context)
        {
                Assert(!context->is_aggref);
                context->is_aggref = true;
-               expression_tree_walker(node, find_cols_walker, (void *) context);
+               expression_tree_walker(node, find_cols_walker, context);
                context->is_aggref = false;
                return false;
        }
-       return expression_tree_walker(node, find_cols_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, find_cols_walker, context);
 }
 
 /*
@@ -4101,7 +4100,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
                                                         &pertrans->transfn,
                                                         numTransArgs,
                                                         pertrans->aggCollation,
-                                                        (void *) aggstate, NULL);
+                                                        (Node *) aggstate, NULL);
 
        /* get info about the state value's datatype */
        get_typlenbyval(aggtranstype,
@@ -4121,7 +4120,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
                                                                 &pertrans->serialfn,
                                                                 1,
                                                                 InvalidOid,
-                                                                (void *) aggstate, NULL);
+                                                                (Node *) aggstate, NULL);
        }
 
        if (OidIsValid(aggdeserialfn))
@@ -4137,7 +4136,7 @@ build_pertrans_for_aggref(AggStatePerTrans pertrans,
                                                                 &pertrans->deserialfn,
                                                                 2,
                                                                 InvalidOid,
-                                                                (void *) aggstate, NULL);
+                                                                (Node *) aggstate, NULL);
        }
 
        /*
index 3fc925d7b48e58a774581d43fcceb923ad6210e1..760f2d8e8f3d71879686dcbeab62e083de60b919 100644 (file)
@@ -122,7 +122,7 @@ ExecSort(PlanState *pstate)
                                                                                                  tuplesortopts);
                if (node->bounded)
                        tuplesort_set_bound(tuplesortstate, node->bound);
-               node->tuplesortstate = (void *) tuplesortstate;
+               node->tuplesortstate = tuplesortstate;
 
                /*
                 * Scan the subplan and feed all the tuples to tuplesort using the
index 51a6708a3923f7f43cc4095ca899ce6c7802cb0d..e75e8576725715ee19799b0cd96d5a0e3a6ee6da 100644 (file)
@@ -339,7 +339,7 @@ advance_windowaggregate(WindowAggState *winstate,
        InitFunctionCallInfoData(*fcinfo, &(peraggstate->transfn),
                                                         numArguments + 1,
                                                         perfuncstate->winCollation,
-                                                        (void *) winstate, NULL);
+                                                        (Node *) winstate, NULL);
        fcinfo->args[0].value = peraggstate->transValue;
        fcinfo->args[0].isnull = peraggstate->transValueIsNull;
        winstate->curaggcontext = peraggstate->aggcontext;
@@ -510,7 +510,7 @@ advance_windowaggregate_base(WindowAggState *winstate,
        InitFunctionCallInfoData(*fcinfo, &(peraggstate->invtransfn),
                                                         numArguments + 1,
                                                         perfuncstate->winCollation,
-                                                        (void *) winstate, NULL);
+                                                        (Node *) winstate, NULL);
        fcinfo->args[0].value = peraggstate->transValue;
        fcinfo->args[0].isnull = peraggstate->transValueIsNull;
        winstate->curaggcontext = peraggstate->aggcontext;
@@ -601,7 +601,7 @@ finalize_windowaggregate(WindowAggState *winstate,
                InitFunctionCallInfoData(fcinfodata.fcinfo, &(peraggstate->finalfn),
                                                                 numFinalArgs,
                                                                 perfuncstate->winCollation,
-                                                                (void *) winstate, NULL);
+                                                                (Node *) winstate, NULL);
                fcinfo->args[0].value =
                        MakeExpandedObjectReadOnly(peraggstate->transValue,
                                                                           peraggstate->transValueIsNull,
@@ -1047,7 +1047,7 @@ eval_windowfunction(WindowAggState *winstate, WindowStatePerFunc perfuncstate,
        InitFunctionCallInfoData(*fcinfo, &(perfuncstate->flinfo),
                                                         perfuncstate->numArguments,
                                                         perfuncstate->winCollation,
-                                                        (void *) perfuncstate->winobj, NULL);
+                                                        (Node *) perfuncstate->winobj, NULL);
        /* Just in case, make all the regular argument slots be null */
        for (int argno = 0; argno < perfuncstate->numArguments; argno++)
                fcinfo->args[argno].isnull = true;
index 2fd96a71294890cb9369dc1c656807537a9b75bd..3104b871cf1665225b784d48980e76c94a583d4d 100644 (file)
@@ -702,7 +702,7 @@ tokenize_auth_file(const char *filename, FILE *file, List **tok_lines,
        callback_arg.linenum = line_number;
 
        tokenerrcontext.callback = tokenize_error_callback;
-       tokenerrcontext.arg = (void *) &callback_arg;
+       tokenerrcontext.arg = &callback_arg;
        tokenerrcontext.previous = error_context_stack;
        error_context_stack = &tokenerrcontext;
 
index 3060847b13346650753fa31bf4b70593651b3a68..50705a1e158baa507ab1ff590242a24aa0beb49f 100644 (file)
@@ -2020,7 +2020,7 @@ check_functions_in_node(Node *node, check_function_callback checker,
  *                     ... do special actions for other node types
  *             }
  *             // for any node type not specially processed, do:
- *             return expression_tree_walker(node, my_walker, (void *) context);
+ *             return expression_tree_walker(node, my_walker, context);
  * }
  *
  * The "context" argument points to a struct that holds whatever context
@@ -2893,7 +2893,7 @@ range_table_entry_walker_impl(RangeTblEntry *rte,
  *                     ... do special transformations of other node types
  *             }
  *             // for any node type not specially processed, do:
- *             return expression_tree_mutator(node, my_mutator, (void *) context);
+ *             return expression_tree_mutator(node, my_mutator, context);
  * }
  *
  * The "context" argument points to a struct that holds whatever context
index cf54ffbe0d9234a44482d993f02a04d38e1a29f9..3acc7508e71b6653c29685d6bdcd919df4ba4129 100644 (file)
@@ -55,7 +55,7 @@ makeParamList(int numParams)
        retval->paramCompile = NULL;
        retval->paramCompileArg = NULL;
        retval->parserSetup = paramlist_parser_setup;
-       retval->parserSetupArg = (void *) retval;
+       retval->parserSetupArg = retval;
        retval->paramValuesStr = NULL;
        retval->numParams = numParams;
 
index 190099e5cf3c7cb302cf81836d961c6e03806477..27d3aa806ecd08fa90cfe38c190927fbee69f918 100644 (file)
@@ -507,5 +507,5 @@ nodeRead(const char *token, int tok_len)
                        break;
        }
 
-       return (void *) result;
+       return result;
 }
index 0c5540e2af4456431ec7a5801f78174cb0e85285..aee2a83d7eb6d2ac6831da11d19f679033e443b8 100644 (file)
@@ -99,7 +99,7 @@ geqo(PlannerInfo *root, int number_of_rels, List *initial_rels)
 #endif
 
 /* set up private information */
-       root->join_search_private = (void *) &private;
+       root->join_search_private = &private;
        private.initial_rels = initial_rels;
 
 /* initialize private number generator */
index 2bb6db1df777b7048094cd36cbf5c063ed25bbba..c36687aa4df74d62c2c4dd74d6c81c58242e7c9e 100644 (file)
@@ -5029,8 +5029,7 @@ cost_qual_eval_walker(Node *node, cost_qual_eval_context *context)
        }
 
        /* recurse into children */
-       return expression_tree_walker(node, cost_qual_eval_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, cost_qual_eval_walker, context);
 }
 
 /*
index e50b6fd56a0e1d2c8260da611039a3666b90bcdb..d827fc9f4d9ffb3e4db337351048fe885b406702 100644 (file)
@@ -2463,7 +2463,7 @@ match_eclass_clauses_to_index(PlannerInfo *root, IndexOptInfo *index,
                clauses = generate_implied_equalities_for_column(root,
                                                                                                                 index->rel,
                                                                                                                 ec_member_matches_indexcol,
-                                                                                                                (void *) &arg,
+                                                                                                                &arg,
                                                                                                                 index->rel->lateral_referencers);
 
                /*
index f2ed0d81f61813d8c17e1ebaf452df0063a6d910..178c572b021ba64edc45f90934e89d64f857e5fe 100644 (file)
@@ -5037,9 +5037,7 @@ replace_nestloop_params_mutator(Node *node, PlannerInfo *root)
                /* Replace the PlaceHolderVar with a nestloop Param */
                return (Node *) replace_nestloop_param_placeholdervar(root, phv);
        }
-       return expression_tree_mutator(node,
-                                                                  replace_nestloop_params_mutator,
-                                                                  (void *) root);
+       return expression_tree_mutator(node, replace_nestloop_params_mutator, root);
 }
 
 /*
index 91c7c4fe2fe9a717af41c3bc3b19656ec2edf500..6d23df108dacafe5acc2f819c52c945735fa5652 100644 (file)
@@ -485,7 +485,7 @@ flatten_unplanned_rtes(PlannerGlobal *glob, RangeTblEntry *rte)
        /* Use query_tree_walker to find all RTEs in the parse tree */
        (void) query_tree_walker(rte->subquery,
                                                         flatten_rtes_walker,
-                                                        (void *) &cxt,
+                                                        &cxt,
                                                         QTW_EXAMINE_RTES_BEFORE);
 }
 
@@ -516,13 +516,12 @@ flatten_rtes_walker(Node *node, flatten_rtes_walker_context *cxt)
                cxt->query = (Query *) node;
                result = query_tree_walker((Query *) node,
                                                                   flatten_rtes_walker,
-                                                                  (void *) cxt,
+                                                                  cxt,
                                                                   QTW_EXAMINE_RTES_BEFORE);
                cxt->query = save_query;
                return result;
        }
-       return expression_tree_walker(node, flatten_rtes_walker,
-                                                                 (void *) cxt);
+       return expression_tree_walker(node, flatten_rtes_walker, cxt);
 }
 
 /*
@@ -2243,8 +2242,7 @@ fix_scan_expr_mutator(Node *node, fix_scan_expr_context *context)
                                                                                                                         context->num_exec),
                                                                         context);
        fix_expr_common(context->root, node);
-       return expression_tree_mutator(node, fix_scan_expr_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, fix_scan_expr_mutator, context);
 }
 
 static bool
@@ -2256,8 +2254,7 @@ fix_scan_expr_walker(Node *node, fix_scan_expr_context *context)
        Assert(!IsA(node, PlaceHolderVar));
        Assert(!IsA(node, AlternativeSubPlan));
        fix_expr_common(context->root, node);
-       return expression_tree_walker(node, fix_scan_expr_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, fix_scan_expr_walker, context);
 }
 
 /*
@@ -2612,8 +2609,7 @@ convert_combining_aggrefs(Node *node, void *context)
 
                return (Node *) parent_agg;
        }
-       return expression_tree_mutator(node, convert_combining_aggrefs,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, convert_combining_aggrefs, context);
 }
 
 /*
@@ -3165,9 +3161,7 @@ fix_join_expr_mutator(Node *node, fix_join_expr_context *context)
                                                                                                                         context->num_exec),
                                                                         context);
        fix_expr_common(context->root, node);
-       return expression_tree_mutator(node,
-                                                                  fix_join_expr_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, fix_join_expr_mutator, context);
 }
 
 /*
@@ -3292,9 +3286,7 @@ fix_upper_expr_mutator(Node *node, fix_upper_expr_context *context)
                                                                                                                          context->num_exec),
                                                                          context);
        fix_expr_common(context->root, node);
-       return expression_tree_mutator(node,
-                                                                  fix_upper_expr_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, fix_upper_expr_mutator, context);
 }
 
 /*
@@ -3390,7 +3382,7 @@ fix_windowagg_condition_expr_mutator(Node *node,
 
        return expression_tree_mutator(node,
                                                                   fix_windowagg_condition_expr_mutator,
-                                                                  (void *) context);
+                                                                  context);
 }
 
 /*
@@ -3656,10 +3648,10 @@ extract_query_dependencies_walker(Node *node, PlannerInfo *context)
 
                /* And recurse into the query's subexpressions */
                return query_tree_walker(query, extract_query_dependencies_walker,
-                                                                (void *) context, 0);
+                                                                context, 0);
        }
        /* Extract function dependencies and check for regclass Consts */
        fix_expr_common(context, node);
        return expression_tree_walker(node, extract_query_dependencies_walker,
-                                                                 (void *) context);
+                                                                 context);
 }
index 09d5f0f571bb3d371c06ab43abf1a455d3035c4a..ed62e3a0fcf26af25300f820c1788d2d4c44cfca 100644 (file)
@@ -697,9 +697,7 @@ convert_testexpr_mutator(Node *node,
                 */
                return node;
        }
-       return expression_tree_mutator(node,
-                                                                  convert_testexpr_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, convert_testexpr_mutator, context);
 }
 
 /*
@@ -1121,14 +1119,13 @@ contain_outer_selfref_walker(Node *node, Index *depth)
                (*depth)++;
 
                result = query_tree_walker(query, contain_outer_selfref_walker,
-                                                                  (void *) depth, QTW_EXAMINE_RTES_BEFORE);
+                                                                  depth, QTW_EXAMINE_RTES_BEFORE);
 
                (*depth)--;
 
                return result;
        }
-       return expression_tree_walker(node, contain_outer_selfref_walker,
-                                                                 (void *) depth);
+       return expression_tree_walker(node, contain_outer_selfref_walker, depth);
 }
 
 /*
@@ -1927,9 +1924,7 @@ replace_correlation_vars_mutator(Node *node, PlannerInfo *root)
                        return (Node *) replace_outer_merge_support(root,
                                                                                                                (MergeSupportFunc *) node);
        }
-       return expression_tree_mutator(node,
-                                                                  replace_correlation_vars_mutator,
-                                                                  (void *) root);
+       return expression_tree_mutator(node, replace_correlation_vars_mutator, root);
 }
 
 /*
@@ -2077,7 +2072,7 @@ process_sublinks_mutator(Node *node, process_sublinks_context *context)
 
        return expression_tree_mutator(node,
                                                                   process_sublinks_mutator,
-                                                                  (void *) &locContext);
+                                                                  &locContext);
 }
 
 /*
@@ -2985,8 +2980,7 @@ finalize_primnode(Node *node, finalize_primnode_context *context)
 
                return false;                   /* no more to do here */
        }
-       return expression_tree_walker(node, finalize_primnode,
-                                                                 (void *) context);
+       return expression_tree_walker(node, finalize_primnode, context);
 }
 
 /*
@@ -3008,8 +3002,7 @@ finalize_agg_primnode(Node *node, finalize_primnode_context *context)
                finalize_primnode((Node *) agg->aggfilter, context);
                return false;                   /* there can't be any Aggrefs below here */
        }
-       return expression_tree_walker(node, finalize_agg_primnode,
-                                                                 (void *) context);
+       return expression_tree_walker(node, finalize_agg_primnode, context);
 }
 
 /*
index 4606df379a82ee2a43322d78bdd4acae6e64d870..e935c9d09439af0cbb1d3d8540ed70a2de7010a3 100644 (file)
@@ -359,8 +359,7 @@ preprocess_aggrefs_walker(Node *node, PlannerInfo *root)
                return false;
        }
        Assert(!IsA(node, SubLink));
-       return expression_tree_walker(node, preprocess_aggrefs_walker,
-                                                                 (void *) root);
+       return expression_tree_walker(node, preprocess_aggrefs_walker, root);
 }
 
 
index 33b10d72cb50c84d5bf8769cfdae8d420d6b2fc2..74829a09d1c3d16436548419639d82b11a777337 100644 (file)
@@ -2450,7 +2450,7 @@ pullup_replace_vars(Node *expr, pullup_replace_vars_context *context)
        return replace_rte_variables(expr,
                                                                 context->varno, 0,
                                                                 pullup_replace_vars_callback,
-                                                                (void *) context,
+                                                                context,
                                                                 context->outer_hasSubLinks);
 }
 
@@ -2707,7 +2707,7 @@ pullup_replace_vars_subquery(Query *query,
        return (Query *) replace_rte_variables((Node *) query,
                                                                                   context->varno, 1,
                                                                                   pullup_replace_vars_callback,
-                                                                                  (void *) context,
+                                                                                  context,
                                                                                   NULL);
 }
 
@@ -3775,7 +3775,7 @@ find_dependent_phvs_walker(Node *node,
                context->sublevels_up++;
                result = query_tree_walker((Query *) node,
                                                                   find_dependent_phvs_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
@@ -3784,8 +3784,7 @@ find_dependent_phvs_walker(Node *node,
        Assert(!IsA(node, PlaceHolderInfo));
        Assert(!IsA(node, MinMaxAggInfo));
 
-       return expression_tree_walker(node, find_dependent_phvs_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, find_dependent_phvs_walker, context);
 }
 
 static bool
@@ -3800,15 +3799,12 @@ find_dependent_phvs(PlannerInfo *root, int varno)
        context.relids = bms_make_singleton(varno);
        context.sublevels_up = 0;
 
-       if (query_tree_walker(root->parse,
-                                                 find_dependent_phvs_walker,
-                                                 (void *) &context,
-                                                 0))
+       if (query_tree_walker(root->parse, find_dependent_phvs_walker, &context, 0))
                return true;
        /* The append_rel_list could be populated already, so check it too */
        if (expression_tree_walker((Node *) root->append_rel_list,
                                                           find_dependent_phvs_walker,
-                                                          (void *) &context))
+                                                          &context))
                return true;
        return false;
 }
@@ -3847,10 +3843,7 @@ find_dependent_phvs_in_jointree(PlannerInfo *root, Node *node, int varno)
                RangeTblEntry *rte = rt_fetch(relid, root->parse->rtable);
 
                if (rte->lateral &&
-                       range_table_entry_walker(rte,
-                                                                        find_dependent_phvs_walker,
-                                                                        (void *) &context,
-                                                                        0))
+                       range_table_entry_walker(rte, find_dependent_phvs_walker, &context, 0))
                        return true;
        }
 
@@ -3907,7 +3900,7 @@ substitute_phv_relids_walker(Node *node,
                context->sublevels_up++;
                result = query_tree_walker((Query *) node,
                                                                   substitute_phv_relids_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
@@ -3917,8 +3910,7 @@ substitute_phv_relids_walker(Node *node,
        Assert(!IsA(node, PlaceHolderInfo));
        Assert(!IsA(node, MinMaxAggInfo));
 
-       return expression_tree_walker(node, substitute_phv_relids_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, substitute_phv_relids_walker, context);
 }
 
 static void
@@ -3935,7 +3927,7 @@ substitute_phv_relids(Node *node, int varno, Relids subrelids)
         */
        query_or_expression_tree_walker(node,
                                                                        substitute_phv_relids_walker,
-                                                                       (void *) &context,
+                                                                       &context,
                                                                        0);
 }
 
index 49897226371dcad29d715f6049e66784563f3c27..45e8b74f94414daaf2fa77d73561c145f4e0050f 100644 (file)
@@ -425,7 +425,7 @@ adjust_appendrel_attrs_mutator(Node *node,
 
                phv = (PlaceHolderVar *) expression_tree_mutator(node,
                                                                                                                 adjust_appendrel_attrs_mutator,
-                                                                                                                (void *) context);
+                                                                                                                context);
                /* now fix PlaceHolderVar's relid sets */
                if (phv->phlevelsup == 0)
                {
@@ -509,8 +509,7 @@ adjust_appendrel_attrs_mutator(Node *node,
        Assert(!IsA(node, RangeTblRef));
        Assert(!IsA(node, JoinExpr));
 
-       return expression_tree_mutator(node, adjust_appendrel_attrs_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, adjust_appendrel_attrs_mutator, context);
 }
 
 /*
index 8e39795e24509ef2396b55debadf4f5bea62e65a..bb7a9b772807c63cf2a026058187c23468496d30 100644 (file)
@@ -265,8 +265,7 @@ find_window_functions_walker(Node *node, WindowFuncLists *lists)
                return false;
        }
        Assert(!IsA(node, SubLink));
-       return expression_tree_walker(node, find_window_functions_walker,
-                                                                 (void *) lists);
+       return expression_tree_walker(node, find_window_functions_walker, lists);
 }
 
 
@@ -1217,7 +1216,7 @@ contain_context_dependent_node_walker(Node *node, int *flags)
                        *flags |= CCDN_CASETESTEXPR_OK;
                        res = expression_tree_walker(node,
                                                                                 contain_context_dependent_node_walker,
-                                                                                (void *) flags);
+                                                                                flags);
                        *flags = save_flags;
                        return res;
                }
@@ -1241,7 +1240,7 @@ contain_context_dependent_node_walker(Node *node, int *flags)
                return res;
        }
        return expression_tree_walker(node, contain_context_dependent_node_walker,
-                                                                 (void *) flags);
+                                                                 flags);
 }
 
 /*****************************************************************************
@@ -2416,7 +2415,7 @@ estimate_expression_value(PlannerInfo *root, Node *node)
  */
 #define ece_generic_processing(node) \
        expression_tree_mutator((Node *) (node), eval_const_expressions_mutator, \
-                                                       (void *) context)
+                                                       context)
 
 /*
  * Check whether all arguments of the given node were reduced to Consts.
@@ -2552,7 +2551,7 @@ eval_const_expressions_mutator(Node *node,
                                args = (List *)
                                        expression_tree_mutator((Node *) args,
                                                                                        eval_const_expressions_mutator,
-                                                                                       (void *) context);
+                                                                                       context);
                                /* ... and the filter expression, which isn't */
                                aggfilter = (Expr *)
                                        eval_const_expressions_mutator((Node *) expr->aggfilter,
@@ -2697,7 +2696,7 @@ eval_const_expressions_mutator(Node *node,
                                 */
                                args = (List *) expression_tree_mutator((Node *) expr->args,
                                                                                                                eval_const_expressions_mutator,
-                                                                                                               (void *) context);
+                                                                                                               context);
 
                                /*
                                 * We must do our own check for NULLs because DistinctExpr has
@@ -4094,7 +4093,7 @@ simplify_function(Oid funcid, Oid result_type, int32 result_typmod,
                args = expand_function_arguments(args, false, result_type, func_tuple);
                args = (List *) expression_tree_mutator((Node *) args,
                                                                                                eval_const_expressions_mutator,
-                                                                                               (void *) context);
+                                                                                               context);
                /* Argument processing done, give it back to the caller */
                *args_p = args;
        }
@@ -4636,7 +4635,7 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid,
        callback_arg.prosrc = src;
 
        sqlerrcontext.callback = sql_inline_error_callback;
-       sqlerrcontext.arg = (void *) &callback_arg;
+       sqlerrcontext.arg = &callback_arg;
        sqlerrcontext.previous = error_context_stack;
        error_context_stack = &sqlerrcontext;
 
@@ -4938,8 +4937,7 @@ substitute_actual_parameters_mutator(Node *node,
                /* We don't need to copy at this time (it'll get done later) */
                return list_nth(context->args, param->paramid - 1);
        }
-       return expression_tree_mutator(node, substitute_actual_parameters_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, substitute_actual_parameters_mutator, context);
 }
 
 /*
@@ -5190,7 +5188,7 @@ inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte)
        callback_arg.prosrc = src;
 
        sqlerrcontext.callback = sql_inline_error_callback;
-       sqlerrcontext.arg = (void *) &callback_arg;
+       sqlerrcontext.arg = &callback_arg;
        sqlerrcontext.previous = error_context_stack;
        error_context_stack = &sqlerrcontext;
 
@@ -5382,7 +5380,7 @@ substitute_actual_srf_parameters_mutator(Node *node,
                context->sublevels_up++;
                result = (Node *) query_tree_mutator((Query *) node,
                                                                                         substitute_actual_srf_parameters_mutator,
-                                                                                        (void *) context,
+                                                                                        context,
                                                                                         0);
                context->sublevels_up--;
                return result;
@@ -5407,7 +5405,7 @@ substitute_actual_srf_parameters_mutator(Node *node,
        }
        return expression_tree_mutator(node,
                                                                   substitute_actual_srf_parameters_mutator,
-                                                                  (void *) context);
+                                                                  context);
 }
 
 /*
@@ -5436,6 +5434,5 @@ pull_paramids_walker(Node *node, Bitmapset **context)
                *context = bms_add_member(*context, param->paramid);
                return false;
        }
-       return expression_tree_walker(node, pull_paramids_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, pull_paramids_walker, context);
 }
index 50ea80773677fa1728fa979da624fc8ab568d747..0a132610140870317e86dbcf01e885bdf1308385 100644 (file)
@@ -908,7 +908,7 @@ static void
 list_startup_fn(Node *clause, PredIterInfo info)
 {
        info->state_list = (List *) clause;
-       info->state = (void *) list_head(info->state_list);
+       info->state = list_head(info->state_list);
 }
 
 static Node *
@@ -920,7 +920,7 @@ list_next_fn(PredIterInfo info)
        if (l == NULL)
                return NULL;
        n = lfirst(l);
-       info->state = (void *) lnext(info->state_list, l);
+       info->state = lnext(info->state_list, l);
        return n;
 }
 
@@ -938,7 +938,7 @@ static void
 boolexpr_startup_fn(Node *clause, PredIterInfo info)
 {
        info->state_list = ((BoolExpr *) clause)->args;
-       info->state = (void *) list_head(info->state_list);
+       info->state = list_head(info->state_list);
 }
 
 /*
@@ -968,7 +968,7 @@ arrayconst_startup_fn(Node *clause, PredIterInfo info)
 
        /* Create working state struct */
        state = (ArrayConstIterState *) palloc(sizeof(ArrayConstIterState));
-       info->state = (void *) state;
+       info->state = state;
 
        /* Deconstruct the array literal */
        arrayconst = (Const *) lsecond(saop->args);
@@ -1047,7 +1047,7 @@ arrayexpr_startup_fn(Node *clause, PredIterInfo info)
 
        /* Create working state struct */
        state = (ArrayExprIterState *) palloc(sizeof(ArrayExprIterState));
-       info->state = (void *) state;
+       info->state = state;
 
        /* Set up a dummy OpExpr to return as the per-item node */
        state->opexpr.xpr.type = T_OpExpr;
index 7ef7f34d8b5d6179d31350fdbfe98796fe741656..482350285a023b761a51963ada11f8fe3ed8b867 100644 (file)
@@ -1139,8 +1139,7 @@ split_pathtarget_walker(Node *node, split_pathtarget_context *context)
                context->current_depth = 0;
                context->current_sgref = 0; /* subexpressions are not sortgroup items */
 
-               (void) expression_tree_walker(node, split_pathtarget_walker,
-                                                                         (void *) context);
+               (void) expression_tree_walker(node, split_pathtarget_walker, context);
 
                /* Depth is one more than any SRF below it */
                srf_depth = context->current_depth + 1;
@@ -1181,8 +1180,7 @@ split_pathtarget_walker(Node *node, split_pathtarget_context *context)
         * examine its inputs.
         */
        context->current_sgref = 0; /* subexpressions are not sortgroup items */
-       return expression_tree_walker(node, split_pathtarget_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, split_pathtarget_walker, context);
 }
 
 /*
index f7534ad53d67f7732193eb199df2231838b65a94..5f721eb8e13ca31b65e4502ba0c895f149ebbf28 100644 (file)
@@ -124,7 +124,7 @@ pull_varnos(PlannerInfo *root, Node *node)
         */
        query_or_expression_tree_walker(node,
                                                                        pull_varnos_walker,
-                                                                       (void *) &context,
+                                                                       &context,
                                                                        0);
 
        return context.varnos;
@@ -150,7 +150,7 @@ pull_varnos_of_level(PlannerInfo *root, Node *node, int levelsup)
         */
        query_or_expression_tree_walker(node,
                                                                        pull_varnos_walker,
-                                                                       (void *) &context,
+                                                                       &context,
                                                                        0);
 
        return context.varnos;
@@ -269,12 +269,11 @@ pull_varnos_walker(Node *node, pull_varnos_context *context)
 
                context->sublevels_up++;
                result = query_tree_walker((Query *) node, pull_varnos_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
-       return expression_tree_walker(node, pull_varnos_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, pull_varnos_walker, context);
 }
 
 
@@ -324,8 +323,7 @@ pull_varattnos_walker(Node *node, pull_varattnos_context *context)
        /* Should not find an unplanned subquery */
        Assert(!IsA(node, Query));
 
-       return expression_tree_walker(node, pull_varattnos_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, pull_varattnos_walker, context);
 }
 
 
@@ -350,7 +348,7 @@ pull_vars_of_level(Node *node, int levelsup)
         */
        query_or_expression_tree_walker(node,
                                                                        pull_vars_walker,
-                                                                       (void *) &context,
+                                                                       &context,
                                                                        0);
 
        return context.vars;
@@ -385,12 +383,11 @@ pull_vars_walker(Node *node, pull_vars_context *context)
 
                context->sublevels_up++;
                result = query_tree_walker((Query *) node, pull_vars_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
-       return expression_tree_walker(node, pull_vars_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, pull_vars_walker, context);
 }
 
 
@@ -449,7 +446,7 @@ contain_vars_of_level(Node *node, int levelsup)
 
        return query_or_expression_tree_walker(node,
                                                                                   contain_vars_of_level_walker,
-                                                                                  (void *) &sublevels_up,
+                                                                                  &sublevels_up,
                                                                                   0);
 }
 
@@ -484,14 +481,14 @@ contain_vars_of_level_walker(Node *node, int *sublevels_up)
                (*sublevels_up)++;
                result = query_tree_walker((Query *) node,
                                                                   contain_vars_of_level_walker,
-                                                                  (void *) sublevels_up,
+                                                                  sublevels_up,
                                                                   0);
                (*sublevels_up)--;
                return result;
        }
        return expression_tree_walker(node,
                                                                  contain_vars_of_level_walker,
-                                                                 (void *) sublevels_up);
+                                                                 sublevels_up);
 }
 
 
@@ -520,7 +517,7 @@ locate_var_of_level(Node *node, int levelsup)
 
        (void) query_or_expression_tree_walker(node,
                                                                                   locate_var_of_level_walker,
-                                                                                  (void *) &context,
+                                                                                  &context,
                                                                                   0);
 
        return context.var_location;
@@ -558,14 +555,14 @@ locate_var_of_level_walker(Node *node,
                context->sublevels_up++;
                result = query_tree_walker((Query *) node,
                                                                   locate_var_of_level_walker,
-                                                                  (void *) context,
+                                                                  context,
                                                                   0);
                context->sublevels_up--;
                return result;
        }
        return expression_tree_walker(node,
                                                                  locate_var_of_level_walker,
-                                                                 (void *) context);
+                                                                 context);
 }
 
 
@@ -707,8 +704,7 @@ pull_var_clause_walker(Node *node, pull_var_clause_context *context)
                else
                        elog(ERROR, "PlaceHolderVar found where not expected");
        }
-       return expression_tree_walker(node, pull_var_clause_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, pull_var_clause_walker, context);
 }
 
 
@@ -867,7 +863,7 @@ flatten_join_alias_vars_mutator(Node *node,
 
                phv = (PlaceHolderVar *) expression_tree_mutator(node,
                                                                                                                 flatten_join_alias_vars_mutator,
-                                                                                                                (void *) context);
+                                                                                                                context);
                /* now fix PlaceHolderVar's relid sets */
                if (phv->phlevelsup == context->sublevels_up)
                {
@@ -889,7 +885,7 @@ flatten_join_alias_vars_mutator(Node *node,
                context->inserted_sublink = ((Query *) node)->hasSubLinks;
                newnode = query_tree_mutator((Query *) node,
                                                                         flatten_join_alias_vars_mutator,
-                                                                        (void *) context,
+                                                                        context,
                                                                         QTW_IGNORE_JOINALIASES);
                newnode->hasSubLinks |= context->inserted_sublink;
                context->inserted_sublink = save_inserted_sublink;
@@ -904,8 +900,7 @@ flatten_join_alias_vars_mutator(Node *node,
        Assert(!IsA(node, PlaceHolderInfo));
        Assert(!IsA(node, MinMaxAggInfo));
 
-       return expression_tree_mutator(node, flatten_join_alias_vars_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, flatten_join_alias_vars_mutator, context);
 }
 
 /*
@@ -1044,7 +1039,7 @@ flatten_group_exprs_mutator(Node *node,
                context->inserted_sublink = ((Query *) node)->hasSubLinks;
                newnode = query_tree_mutator((Query *) node,
                                                                         flatten_group_exprs_mutator,
-                                                                        (void *) context,
+                                                                        context,
                                                                         QTW_IGNORE_GROUPEXPRS);
                newnode->hasSubLinks |= context->inserted_sublink;
                context->inserted_sublink = save_inserted_sublink;
@@ -1053,7 +1048,7 @@ flatten_group_exprs_mutator(Node *node,
        }
 
        return expression_tree_mutator(node, flatten_group_exprs_mutator,
-                                                                  (void *) context);
+                                                                  context);
 }
 
 /*
index 506e0631615f3df01b63d30c2fc83548050e55e5..3864a675d2a58845a63fd952b7405d1fc9a7e3ac 100644 (file)
@@ -1687,7 +1687,7 @@ transformValuesClause(ParseState *pstate, SelectStmt *stmt)
                        Node       *col = (Node *) lfirst(lc);
 
                        col = coerce_to_common_type(pstate, col, coltype, "VALUES");
-                       lfirst(lc) = (void *) col;
+                       lfirst(lc) = col;
                }
 
                coltypmod = select_common_typmod(pstate, colexprs[i], coltype);
index efa730c167645635f713250dd5ea66c6bbaaf04f..04b4596a65a53b38870f601e11ed81e23161d96c 100644 (file)
@@ -799,7 +799,7 @@ check_agg_arguments_walker(Node *node,
                context->sublevels_up++;
                result = query_tree_walker((Query *) node,
                                                                   check_agg_arguments_walker,
-                                                                  (void *) context,
+                                                                  context,
                                                                   0);
                context->sublevels_up--;
                return result;
@@ -807,7 +807,7 @@ check_agg_arguments_walker(Node *node,
 
        return expression_tree_walker(node,
                                                                  check_agg_arguments_walker,
-                                                                 (void *) context);
+                                                                 context);
 }
 
 /*
@@ -1517,13 +1517,13 @@ substitute_grouped_columns_mutator(Node *node,
                context->sublevels_up++;
                newnode = query_tree_mutator((Query *) node,
                                                                         substitute_grouped_columns_mutator,
-                                                                        (void *) context,
+                                                                        context,
                                                                         0);
                context->sublevels_up--;
                return (Node *) newnode;
        }
        return expression_tree_mutator(node, substitute_grouped_columns_mutator,
-                                                                  (void *) context);
+                                                                  context);
 }
 
 /*
@@ -1691,13 +1691,13 @@ finalize_grouping_exprs_walker(Node *node,
                context->sublevels_up++;
                result = query_tree_walker((Query *) node,
                                                                   finalize_grouping_exprs_walker,
-                                                                  (void *) context,
+                                                                  context,
                                                                   0);
                context->sublevels_up--;
                return result;
        }
        return expression_tree_walker(node, finalize_grouping_exprs_walker,
-                                                                 (void *) context);
+                                                                 context);
 }
 
 /*
index 44529bb49e64bb08d30a10e6af3403591252aa5b..2874731c3522ce4d42109b65856bcbf029db9f6d 100644 (file)
@@ -108,7 +108,7 @@ assign_query_collations(ParseState *pstate, Query *query)
         */
        (void) query_tree_walker(query,
                                                         assign_query_collations_walker,
-                                                        (void *) pstate,
+                                                        pstate,
                                                         QTW_IGNORE_RANGE_TABLE |
                                                         QTW_IGNORE_CTE_SUBQUERIES);
 }
@@ -295,7 +295,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
 
                                (void) expression_tree_walker(node,
                                                                                          assign_collations_walker,
-                                                                                         (void *) &loccontext);
+                                                                                         &loccontext);
 
                                collation = expr->collOid;
                                Assert(OidIsValid(collation));
@@ -317,7 +317,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
                                /* ... but first, recurse */
                                (void) expression_tree_walker(node,
                                                                                          assign_collations_walker,
-                                                                                         (void *) &loccontext);
+                                                                                         &loccontext);
 
                                if (OidIsValid(expr->resultcollid))
                                {
@@ -403,7 +403,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
                                /* ... but first, recurse */
                                (void) expression_tree_walker(node,
                                                                                          assign_collations_walker,
-                                                                                         (void *) &loccontext);
+                                                                                         &loccontext);
 
                                if (OidIsValid(typcollation))
                                {
@@ -444,7 +444,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
                case T_TargetEntry:
                        (void) expression_tree_walker(node,
                                                                                  assign_collations_walker,
-                                                                                 (void *) &loccontext);
+                                                                                 &loccontext);
 
                        /*
                         * TargetEntry can have only one child, and should bubble that
@@ -488,7 +488,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
                case T_MergeAction:
                        (void) expression_tree_walker(node,
                                                                                  assign_collations_walker,
-                                                                                 (void *) &loccontext);
+                                                                                 &loccontext);
 
                        /*
                         * When we're invoked on a query's jointree, we don't need to do
@@ -528,7 +528,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
                case T_List:
                        (void) expression_tree_walker(node,
                                                                                  assign_collations_walker,
-                                                                                 (void *) &loccontext);
+                                                                                 &loccontext);
 
                        /*
                         * When processing a list, collation state just bubbles up from
@@ -699,7 +699,7 @@ assign_collations_walker(Node *node, assign_collations_context *context)
                                                 */
                                                (void) expression_tree_walker(node,
                                                                                                          assign_collations_walker,
-                                                                                                         (void *) &loccontext);
+                                                                                                         &loccontext);
                                                break;
                                }
 
index de9ae9b48348d8dd096b3f03efe850b0ad949078..76a008102927ef3364a6fd67d455271d7e4ad4f0 100644 (file)
@@ -746,7 +746,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
                                }
                                (void) raw_expression_tree_walker(node,
                                                                                                  makeDependencyGraphWalker,
-                                                                                                 (void *) cstate);
+                                                                                                 cstate);
                                cstate->innerwiths = list_delete_first(cstate->innerwiths);
                        }
                        else
@@ -768,7 +768,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
                                }
                                (void) raw_expression_tree_walker(node,
                                                                                                  makeDependencyGraphWalker,
-                                                                                                 (void *) cstate);
+                                                                                                 cstate);
                                cstate->innerwiths = list_delete_first(cstate->innerwiths);
                        }
                        /* We're done examining the SelectStmt */
@@ -787,7 +787,7 @@ makeDependencyGraphWalker(Node *node, CteState *cstate)
        }
        return raw_expression_tree_walker(node,
                                                                          makeDependencyGraphWalker,
-                                                                         (void *) cstate);
+                                                                         cstate);
 }
 
 /*
@@ -1130,7 +1130,7 @@ checkWellFormedRecursionWalker(Node *node, CteState *cstate)
        }
        return raw_expression_tree_walker(node,
                                                                          checkWellFormedRecursionWalker,
-                                                                         (void *) cstate);
+                                                                         cstate);
 }
 
 /*
@@ -1147,7 +1147,7 @@ checkWellFormedSelectStmt(SelectStmt *stmt, CteState *cstate)
                /* just recurse without changing state */
                raw_expression_tree_walker((Node *) stmt,
                                                                   checkWellFormedRecursionWalker,
-                                                                  (void *) cstate);
+                                                                  cstate);
        }
        else
        {
@@ -1157,7 +1157,7 @@ checkWellFormedSelectStmt(SelectStmt *stmt, CteState *cstate)
                        case SETOP_UNION:
                                raw_expression_tree_walker((Node *) stmt,
                                                                                   checkWellFormedRecursionWalker,
-                                                                                  (void *) cstate);
+                                                                                  cstate);
                                break;
                        case SETOP_INTERSECT:
                                if (stmt->all)
index 9361b5252d89af02be2b498c718f2123a9865af7..bdaeb90d2e26b3fa120ec8ac2da8f4269c2dfaaf 100644 (file)
@@ -144,7 +144,7 @@ setup_parser_errposition_callback(ParseCallbackState *pcbstate,
        pcbstate->pstate = pstate;
        pcbstate->location = location;
        pcbstate->errcallback.callback = pcb_error_callback;
-       pcbstate->errcallback.arg = (void *) pcbstate;
+       pcbstate->errcallback.arg = pcbstate;
        pcbstate->errcallback.previous = error_context_stack;
        error_context_stack = &pcbstate->errcallback;
 }
index b617591ef682d75fe72851a87b88e3e6c3ca7cad..1ec6c920fbc5f8c3914cc035281a4d145c3ffd90 100644 (file)
@@ -72,7 +72,7 @@ setup_parse_fixed_parameters(ParseState *pstate,
 
        parstate->paramTypes = paramTypes;
        parstate->numParams = numParams;
-       pstate->p_ref_hook_state = (void *) parstate;
+       pstate->p_ref_hook_state = parstate;
        pstate->p_paramref_hook = fixed_paramref_hook;
        /* no need to use p_coerce_param_hook */
 }
@@ -88,7 +88,7 @@ setup_parse_variable_parameters(ParseState *pstate,
 
        parstate->paramTypes = paramTypes;
        parstate->numParams = numParams;
-       pstate->p_ref_hook_state = (void *) parstate;
+       pstate->p_ref_hook_state = parstate;
        pstate->p_paramref_hook = variable_paramref_hook;
        pstate->p_coerce_param_hook = variable_coerce_param_hook;
 }
@@ -274,7 +274,7 @@ check_variable_parameters(ParseState *pstate, Query *query)
        if (*parstate->numParams > 0)
                (void) query_tree_walker(query,
                                                                 check_parameter_resolution_walker,
-                                                                (void *) pstate, 0);
+                                                                pstate, 0);
 }
 
 /*
@@ -318,10 +318,10 @@ check_parameter_resolution_walker(Node *node, ParseState *pstate)
                /* Recurse into RTE subquery or not-yet-planned sublink subquery */
                return query_tree_walker((Query *) node,
                                                                 check_parameter_resolution_walker,
-                                                                (void *) pstate, 0);
+                                                                pstate, 0);
        }
        return expression_tree_walker(node, check_parameter_resolution_walker,
-                                                                 (void *) pstate);
+                                                                 pstate);
 }
 
 /*
index 994ed9995ac5176eea1117e73fd6c27830f93028..72404e72fffd308d45f1a73e86822b9c211f15b3 100644 (file)
@@ -1205,7 +1205,7 @@ setup_scanner_errposition_callback(ScannerCallbackState *scbstate,
        scbstate->yyscanner = yyscanner;
        scbstate->location = location;
        scbstate->errcallback.callback = scb_error_callback;
-       scbstate->errcallback.arg = (void *) scbstate;
+       scbstate->errcallback.arg = scbstate;
        scbstate->errcallback.previous = error_context_stack;
        error_context_stack = &scbstate->errcallback;
 }
index 9a1a7faac7ad99977b27ffdadc57925c83f0c824..4e12ae5d1e3249fd0261ba11ea24cc7f0e0aeb72 100644 (file)
@@ -3365,8 +3365,7 @@ pull_exec_paramids_walker(Node *node, Bitmapset **context)
                        *context = bms_add_member(*context, param->paramid);
                return false;
        }
-       return expression_tree_walker(node, pull_exec_paramids_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, pull_exec_paramids_walker, context);
 }
 
 /*
index 362a37d3b3a21c17dc63216cca6bc627d0f0d0cd..a5a4511f66db095ac15c5079c5c96445df277447 100644 (file)
@@ -286,7 +286,7 @@ static void
 IpcMemoryDetach(int status, Datum shmaddr)
 {
        /* Detach System V shared memory block. */
-       if (shmdt((void *) DatumGetPointer(shmaddr)) < 0)
+       if (shmdt(DatumGetPointer(shmaddr)) < 0)
                elog(LOG, "shmdt(%p) failed: %m", DatumGetPointer(shmaddr));
 }
 
@@ -320,7 +320,7 @@ PGSharedMemoryIsInUse(unsigned long id1, unsigned long id2)
        IpcMemoryState state;
 
        state = PGSharedMemoryAttach((IpcMemoryId) id2, NULL, &memAddress);
-       if (memAddress && shmdt((void *) memAddress) < 0)
+       if (memAddress && shmdt(memAddress) < 0)
                elog(LOG, "shmdt(%p) failed: %m", memAddress);
        switch (state)
        {
@@ -835,7 +835,7 @@ PGSharedMemoryCreate(Size size,
                                break;
                }
 
-               if (oldhdr && shmdt((void *) oldhdr) < 0)
+               if (oldhdr && shmdt(oldhdr) < 0)
                        elog(LOG, "shmdt(%p) failed: %m", oldhdr);
        }
 
index e941bb491d81dc16c1ba380044fb89c60cc082f0..4dc14fdb49505e5aa28d76db9c5bbee4cb438e81 100644 (file)
@@ -800,7 +800,7 @@ startup_cb_wrapper(LogicalDecodingContext *ctx, OutputPluginOptions *opt, bool i
        state.callback_name = "startup";
        state.report_location = InvalidXLogRecPtr;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -828,7 +828,7 @@ shutdown_cb_wrapper(LogicalDecodingContext *ctx)
        state.callback_name = "shutdown";
        state.report_location = InvalidXLogRecPtr;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -862,7 +862,7 @@ begin_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn)
        state.callback_name = "begin";
        state.report_location = txn->first_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -894,7 +894,7 @@ commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "commit";
        state.report_location = txn->final_lsn; /* beginning of commit record */
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -935,7 +935,7 @@ begin_prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn)
        state.callback_name = "begin_prepare";
        state.report_location = txn->first_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -980,7 +980,7 @@ prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "prepare";
        state.report_location = txn->final_lsn; /* beginning of prepare record */
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1025,7 +1025,7 @@ commit_prepared_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "commit_prepared";
        state.report_location = txn->final_lsn; /* beginning of commit record */
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1071,7 +1071,7 @@ rollback_prepared_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "rollback_prepared";
        state.report_location = txn->final_lsn; /* beginning of commit record */
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1114,7 +1114,7 @@ change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "change";
        state.report_location = change->lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1156,7 +1156,7 @@ truncate_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "truncate";
        state.report_location = change->lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1195,7 +1195,7 @@ filter_prepare_cb_wrapper(LogicalDecodingContext *ctx, TransactionId xid,
        state.callback_name = "filter_prepare";
        state.report_location = InvalidXLogRecPtr;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1226,7 +1226,7 @@ filter_by_origin_cb_wrapper(LogicalDecodingContext *ctx, RepOriginId origin_id)
        state.callback_name = "filter_by_origin";
        state.report_location = InvalidXLogRecPtr;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1262,7 +1262,7 @@ message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "message";
        state.report_location = message_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1298,7 +1298,7 @@ stream_start_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "stream_start";
        state.report_location = first_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1347,7 +1347,7 @@ stream_stop_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "stream_stop";
        state.report_location = last_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1396,7 +1396,7 @@ stream_abort_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "stream_abort";
        state.report_location = abort_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1441,7 +1441,7 @@ stream_prepare_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "stream_prepare";
        state.report_location = txn->final_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1482,7 +1482,7 @@ stream_commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "stream_commit";
        state.report_location = txn->final_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1523,7 +1523,7 @@ stream_change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "stream_change";
        state.report_location = change->lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1577,7 +1577,7 @@ stream_message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "stream_message";
        state.report_location = message_lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1618,7 +1618,7 @@ stream_truncate_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "stream_truncate";
        state.report_location = change->lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -1657,7 +1657,7 @@ update_progress_txn_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
        state.callback_name = "update_progress_txn";
        state.report_location = lsn;
        errcallback.callback = output_plugin_error_callback;
-       errcallback.arg = (void *) &state;
+       errcallback.arg = &state;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
index 118503fcb763a6c3c18d1cd70bffeb2b36485e0b..7c8a0e9cfebc1f659743db755f3c124937bb8e17 100644 (file)
@@ -760,7 +760,7 @@ copy_read_data(void *outbuf, int minread, int maxread)
                                if (avail > maxread)
                                        avail = maxread;
                                memcpy(outbuf, &copybuf->data[copybuf->cursor], avail);
-                               outbuf = (void *) ((char *) outbuf + avail);
+                               outbuf = (char *) outbuf + avail;
                                copybuf->cursor += avail;
                                maxread -= avail;
                                bytesread += avail;
index 9474d3dc74df117418e13434be859d52fb0f99c1..887e38d56ef93a9cb29fed324860b1e0ec94a5e0 100644 (file)
@@ -2546,7 +2546,7 @@ check_synchronized_standby_slots(char **newval, void **extra, GucSource source)
                ptr += strlen(slot_name) + 1;
        }
 
-       *extra = (void *) config;
+       *extra = config;
 
        pfree(rawname);
        list_free(elemlist);
index c8931bac1376ebcfd16abbaa78acf105f700ff89..e1126734ef5bdcac12290d23930286588433de77 100644 (file)
@@ -1029,7 +1029,7 @@ check_synchronous_standby_names(char **newval, void **extra, GucSource source)
                        return false;
                memcpy(pconf, syncrep_parse_result, syncrep_parse_result->config_size);
 
-               *extra = (void *) pconf;
+               *extra = pconf;
 
                /*
                 * We need not explicitly clean up syncrep_parse_result.  It, and any
index 6cc9a8d8bfe9052c0c6f57c05ab4c2c7527a6d9d..1a9dfcf624d717318a7f24b87e749d803dcd17f1 100644 (file)
@@ -644,7 +644,7 @@ setRuleCheckAsUser_walker(Node *node, Oid *context)
                return false;
        }
        return expression_tree_walker(node, setRuleCheckAsUser_walker,
-                                                                 (void *) context);
+                                                                 context);
 }
 
 static void
@@ -679,7 +679,7 @@ setRuleCheckAsUser_Query(Query *qry, Oid userid)
 
        /* If there are sublinks, search for them and process their RTEs */
        if (qry->hasSubLinks)
-               query_tree_walker(qry, setRuleCheckAsUser_walker, (void *) &userid,
+               query_tree_walker(qry, setRuleCheckAsUser_walker, &userid,
                                                  QTW_IGNORE_RC_SUBQUERIES);
 }
 
index 063afd4933ed84b12c284fb363a17e7ab327fe3f..ab2e2cd64768f6a93f312f37abad4e9823c4936e 100644 (file)
@@ -1988,8 +1988,7 @@ fireRIRonSubLink(Node *node, fireRIRonSubLink_context *context)
         * Do NOT recurse into Query nodes, because fireRIRrules already processed
         * subselects of subselects for us.
         */
-       return expression_tree_walker(node, fireRIRonSubLink,
-                                                                 (void *) context);
+       return expression_tree_walker(node, fireRIRonSubLink, context);
 }
 
 
@@ -2189,7 +2188,7 @@ fireRIRrules(Query *parsetree, List *activeRIRs)
                context.activeRIRs = activeRIRs;
                context.hasRowSecurity = false;
 
-               query_tree_walker(parsetree, fireRIRonSubLink, (void *) &context,
+               query_tree_walker(parsetree, fireRIRonSubLink, &context,
                                                  QTW_IGNORE_RC_SUBQUERIES);
 
                /*
@@ -2272,10 +2271,10 @@ fireRIRrules(Query *parsetree, List *activeRIRs)
                                fire_context.hasRowSecurity = false;
 
                                expression_tree_walker((Node *) securityQuals,
-                                                                          fireRIRonSubLink, (void *) &fire_context);
+                                                                          fireRIRonSubLink, &fire_context);
 
                                expression_tree_walker((Node *) withCheckOptions,
-                                                                          fireRIRonSubLink, (void *) &fire_context);
+                                                                          fireRIRonSubLink, &fire_context);
 
                                /*
                                 * We can ignore the value of fire_context.hasRowSecurity
index 8f90afb32691f17bc875b10085b07ee4ca7626be..f4e687c986cf55dc40e62dc56a355e6e284c85e4 100644 (file)
@@ -94,7 +94,7 @@ contain_aggs_of_level(Node *node, int levelsup)
         */
        return query_or_expression_tree_walker(node,
                                                                                   contain_aggs_of_level_walker,
-                                                                                  (void *) &context,
+                                                                                  &context,
                                                                                   0);
 }
 
@@ -124,12 +124,12 @@ contain_aggs_of_level_walker(Node *node,
                context->sublevels_up++;
                result = query_tree_walker((Query *) node,
                                                                   contain_aggs_of_level_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
        return expression_tree_walker(node, contain_aggs_of_level_walker,
-                                                                 (void *) context);
+                                                                 context);
 }
 
 /*
@@ -159,7 +159,7 @@ locate_agg_of_level(Node *node, int levelsup)
         */
        (void) query_or_expression_tree_walker(node,
                                                                                   locate_agg_of_level_walker,
-                                                                                  (void *) &context,
+                                                                                  &context,
                                                                                   0);
 
        return context.agg_location;
@@ -198,12 +198,11 @@ locate_agg_of_level_walker(Node *node,
                context->sublevels_up++;
                result = query_tree_walker((Query *) node,
                                                                   locate_agg_of_level_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
-       return expression_tree_walker(node, locate_agg_of_level_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, locate_agg_of_level_walker, context);
 }
 
 /*
@@ -232,8 +231,7 @@ contain_windowfuncs_walker(Node *node, void *context)
        if (IsA(node, WindowFunc))
                return true;                    /* abort the tree traversal and return true */
        /* Mustn't recurse into subselects */
-       return expression_tree_walker(node, contain_windowfuncs_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, contain_windowfuncs_walker, context);
 }
 
 /*
@@ -262,7 +260,7 @@ locate_windowfunc(Node *node)
         */
        (void) query_or_expression_tree_walker(node,
                                                                                   locate_windowfunc_walker,
-                                                                                  (void *) &context,
+                                                                                  &context,
                                                                                   0);
 
        return context.win_location;
@@ -283,8 +281,7 @@ locate_windowfunc_walker(Node *node, locate_windowfunc_context *context)
                /* else fall through to examine argument */
        }
        /* Mustn't recurse into subselects */
-       return expression_tree_walker(node, locate_windowfunc_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, locate_windowfunc_walker, context);
 }
 
 /*
@@ -468,12 +465,11 @@ OffsetVarNodes_walker(Node *node, OffsetVarNodes_context *context)
 
                context->sublevels_up++;
                result = query_tree_walker((Query *) node, OffsetVarNodes_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
-       return expression_tree_walker(node, OffsetVarNodes_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, OffsetVarNodes_walker, context);
 }
 
 void
@@ -521,8 +517,7 @@ OffsetVarNodes(Node *node, int offset, int sublevels_up)
                                rc->rti += offset;
                        }
                }
-               query_tree_walker(qry, OffsetVarNodes_walker,
-                                                 (void *) &context, 0);
+               query_tree_walker(qry, OffsetVarNodes_walker, &context, 0);
        }
        else
                OffsetVarNodes_walker(node, &context);
@@ -662,12 +657,11 @@ ChangeVarNodes_walker(Node *node, ChangeVarNodes_context *context)
 
                context->sublevels_up++;
                result = query_tree_walker((Query *) node, ChangeVarNodes_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
-       return expression_tree_walker(node, ChangeVarNodes_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, ChangeVarNodes_walker, context);
 }
 
 void
@@ -718,8 +712,7 @@ ChangeVarNodes(Node *node, int rt_index, int new_index, int sublevels_up)
                                        rc->rti = new_index;
                        }
                }
-               query_tree_walker(qry, ChangeVarNodes_walker,
-                                                 (void *) &context, 0);
+               query_tree_walker(qry, ChangeVarNodes_walker, &context, 0);
        }
        else
                ChangeVarNodes_walker(node, &context);
@@ -836,13 +829,12 @@ IncrementVarSublevelsUp_walker(Node *node,
                context->min_sublevels_up++;
                result = query_tree_walker((Query *) node,
                                                                   IncrementVarSublevelsUp_walker,
-                                                                  (void *) context,
+                                                                  context,
                                                                   QTW_EXAMINE_RTES_BEFORE);
                context->min_sublevels_up--;
                return result;
        }
-       return expression_tree_walker(node, IncrementVarSublevelsUp_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, IncrementVarSublevelsUp_walker, context);
 }
 
 void
@@ -860,7 +852,7 @@ IncrementVarSublevelsUp(Node *node, int delta_sublevels_up,
         */
        query_or_expression_tree_walker(node,
                                                                        IncrementVarSublevelsUp_walker,
-                                                                       (void *) &context,
+                                                                       &context,
                                                                        QTW_EXAMINE_RTES_BEFORE);
 }
 
@@ -879,7 +871,7 @@ IncrementVarSublevelsUp_rtable(List *rtable, int delta_sublevels_up,
 
        range_table_walker(rtable,
                                           IncrementVarSublevelsUp_walker,
-                                          (void *) &context,
+                                          &context,
                                           QTW_EXAMINE_RTES_BEFORE);
 }
 
@@ -954,12 +946,11 @@ rangeTableEntry_used_walker(Node *node,
 
                context->sublevels_up++;
                result = query_tree_walker((Query *) node, rangeTableEntry_used_walker,
-                                                                  (void *) context, 0);
+                                                                  context, 0);
                context->sublevels_up--;
                return result;
        }
-       return expression_tree_walker(node, rangeTableEntry_used_walker,
-                                                                 (void *) context);
+       return expression_tree_walker(node, rangeTableEntry_used_walker, context);
 }
 
 bool
@@ -976,7 +967,7 @@ rangeTableEntry_used(Node *node, int rt_index, int sublevels_up)
         */
        return query_or_expression_tree_walker(node,
                                                                                   rangeTableEntry_used_walker,
-                                                                                  (void *) &context,
+                                                                                  &context,
                                                                                   0);
 }
 
@@ -1218,13 +1209,12 @@ add_nulling_relids_mutator(Node *node,
                context->sublevels_up++;
                newnode = query_tree_mutator((Query *) node,
                                                                         add_nulling_relids_mutator,
-                                                                        (void *) context,
+                                                                        context,
                                                                         0);
                context->sublevels_up--;
                return (Node *) newnode;
        }
-       return expression_tree_mutator(node, add_nulling_relids_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, add_nulling_relids_mutator, context);
 }
 
 /*
@@ -1289,7 +1279,7 @@ remove_nulling_relids_mutator(Node *node,
                        phv = (PlaceHolderVar *)
                                expression_tree_mutator(node,
                                                                                remove_nulling_relids_mutator,
-                                                                               (void *) context);
+                                                                               context);
                        /* ... and replace the copy's phnullingrels field */
                        phv->phnullingrels = bms_difference(phv->phnullingrels,
                                                                                                context->removable_relids);
@@ -1309,13 +1299,12 @@ remove_nulling_relids_mutator(Node *node,
                context->sublevels_up++;
                newnode = query_tree_mutator((Query *) node,
                                                                         remove_nulling_relids_mutator,
-                                                                        (void *) context,
+                                                                        context,
                                                                         0);
                context->sublevels_up--;
                return (Node *) newnode;
        }
-       return expression_tree_mutator(node, remove_nulling_relids_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, remove_nulling_relids_mutator, context);
 }
 
 
@@ -1372,7 +1361,7 @@ replace_rte_variables(Node *node, int target_varno, int sublevels_up,
         */
        result = query_or_expression_tree_mutator(node,
                                                                                          replace_rte_variables_mutator,
-                                                                                         (void *) &context,
+                                                                                         &context,
                                                                                          0);
 
        if (context.inserted_sublink)
@@ -1442,15 +1431,14 @@ replace_rte_variables_mutator(Node *node,
                context->inserted_sublink = ((Query *) node)->hasSubLinks;
                newnode = query_tree_mutator((Query *) node,
                                                                         replace_rte_variables_mutator,
-                                                                        (void *) context,
+                                                                        context,
                                                                         0);
                newnode->hasSubLinks |= context->inserted_sublink;
                context->inserted_sublink = save_inserted_sublink;
                context->sublevels_up--;
                return (Node *) newnode;
        }
-       return expression_tree_mutator(node, replace_rte_variables_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, replace_rte_variables_mutator, context);
 }
 
 
@@ -1601,13 +1589,12 @@ map_variable_attnos_mutator(Node *node,
                context->sublevels_up++;
                newnode = query_tree_mutator((Query *) node,
                                                                         map_variable_attnos_mutator,
-                                                                        (void *) context,
+                                                                        context,
                                                                         0);
                context->sublevels_up--;
                return (Node *) newnode;
        }
-       return expression_tree_mutator(node, map_variable_attnos_mutator,
-                                                                  (void *) context);
+       return expression_tree_mutator(node, map_variable_attnos_mutator, context);
 }
 
 Node *
@@ -1632,7 +1619,7 @@ map_variable_attnos(Node *node,
         */
        return query_or_expression_tree_mutator(node,
                                                                                        map_variable_attnos_mutator,
-                                                                                       (void *) &context,
+                                                                                       &context,
                                                                                        0);
 }
 
@@ -1786,6 +1773,6 @@ ReplaceVarsFromTargetList(Node *node,
 
        return replace_rte_variables(node, target_varno, sublevels_up,
                                                                 ReplaceVarsFromTargetList_callback,
-                                                                (void *) &context,
+                                                                &context,
                                                                 outer_hasSubLinks);
 }
index 0fa54689303a99c900826d7a7a5ac81fecc073b8..141dd724802f211328291bf76b16c4d8f31e79d8 100644 (file)
@@ -77,7 +77,7 @@ InitBufTable(int size)
 uint32
 BufTableHashCode(BufferTag *tagPtr)
 {
-       return get_hash_value(SharedBufHash, (void *) tagPtr);
+       return get_hash_value(SharedBufHash, tagPtr);
 }
 
 /*
index 0f02bf62fa346671e81a92cb192c29018a322619..cc9782b7132e4c85c05ee7009d3dfa4396a49ef5 100644 (file)
@@ -3801,7 +3801,7 @@ FlushBuffer(BufferDesc *buf, SMgrRelation reln, IOObject io_object,
 
        /* Setup error traceback support for ereport() */
        errcallback.callback = shared_buffer_write_error_callback;
-       errcallback.arg = (void *) buf;
+       errcallback.arg = buf;
        errcallback.previous = error_context_stack;
        error_context_stack = &errcallback;
 
@@ -4514,7 +4514,7 @@ FlushRelationBuffers(Relation rel)
 
                                /* Setup error traceback support for ereport() */
                                errcallback.callback = local_buffer_write_error_callback;
-                               errcallback.arg = (void *) bufHdr;
+                               errcallback.arg = bufHdr;
                                errcallback.previous = error_context_stack;
                                error_context_stack = &errcallback;
 
index 50f987ae2404ffcc98f892321e9b250a0e2273aa..6d3074594a6697f2e6ad3094583c30ca0232c99a 100644 (file)
@@ -207,7 +207,7 @@ ShmemAllocRaw(Size size, Size *allocated_size)
        newFree = newStart + size;
        if (newFree <= ShmemSegHdr->totalsize)
        {
-               newSpace = (void *) ((char *) ShmemBase + newStart);
+               newSpace = (char *) ShmemBase + newStart;
                ShmemSegHdr->freeoffset = newFree;
        }
        else
@@ -253,7 +253,7 @@ ShmemAllocUnlocked(Size size)
                                                size)));
        ShmemSegHdr->freeoffset = newFree;
 
-       newSpace = (void *) ((char *) ShmemBase + newStart);
+       newSpace = (char *) ShmemBase + newStart;
 
        Assert(newSpace == (void *) MAXALIGN(newSpace));
 
index bd4247671764dfd2c3fa01d5bd01a01b3e393065..4b985bd0561513c74719d1da03fe5759ac41f9e0 100644 (file)
@@ -1816,7 +1816,7 @@ exec_bind_message(StringInfo input_message)
                one_param_data.paramval = NULL;
                params_errcxt.previous = error_context_stack;
                params_errcxt.callback = bind_param_error_callback;
-               params_errcxt.arg = (void *) &one_param_data;
+               params_errcxt.arg = &one_param_data;
                error_context_stack = &params_errcxt;
 
                params = makeParamList(numParams);
@@ -2006,7 +2006,7 @@ exec_bind_message(StringInfo input_message)
        params_data.params = params;
        params_errcxt.previous = error_context_stack;
        params_errcxt.callback = ParamsErrorCallback;
-       params_errcxt.arg = (void *) &params_data;
+       params_errcxt.arg = &params_data;
        error_context_stack = &params_errcxt;
 
        /* Get the result format codes */
@@ -2251,7 +2251,7 @@ exec_execute_message(const char *portal_name, long max_rows)
        params_data.params = portalParams;
        params_errcxt.previous = error_context_stack;
        params_errcxt.callback = ParamsErrorCallback;
-       params_errcxt.arg = (void *) &params_data;
+       params_errcxt.arg = &params_data;
        error_context_stack = &params_errcxt;
 
        if (max_rows <= 0)
index 259f2e9901d857c5c438b2e037904dbd50807ebf..6b159f9f5699b97cc4065438396aeac589a922f2 100644 (file)
@@ -859,7 +859,7 @@ thesaurus_lexize(PG_FUNCTION_ARGS)
                info = NULL;                    /* word isn't recognized */
        }
 
-       dstate->private_state = (void *) info;
+       dstate->private_state = info;
 
        if (!info)
        {
index 1aef9ca1ef2572d8deeadb6da064ffa2ede43632..aaedb0aa8522b8f3b21f105a0cffeab989b00142 100644 (file)
@@ -148,7 +148,7 @@ compact_palloc0(IspellDict *Conf, size_t size)
                Conf->avail = COMPACT_ALLOC_CHUNK;
        }
 
-       result = (void *) Conf->firstfree;
+       result = Conf->firstfree;
        Conf->firstfree += size;
        Conf->avail -= size;
 
index bc44599de6aa57435a443b572e96ef4e8ff8adac..f8367b41312fa8b91bfc0c7866eb30a8e44b8793 100644 (file)
@@ -142,7 +142,7 @@ tsearch_readline_begin(tsearch_readline_state *stp,
        stp->curline = NULL;
        /* Setup error traceback support for ereport() */
        stp->cb.callback = tsearch_readline_callback;
-       stp->cb.arg = (void *) stp;
+       stp->cb.arg = stp;
        stp->cb.previous = error_context_stack;
        error_context_stack = &stp->cb;
        return true;
index 517f200a9b451f8865e803b3c092a8c649144a08..02b01630647ef419a50d956ef99dbee30f06942d 100644 (file)
@@ -366,9 +366,9 @@ parsetext(Oid cfgId, ParsedText *prs, char *buf, int buflen)
        cfg = lookup_ts_config_cache(cfgId);
        prsobj = lookup_ts_parser_cache(cfg->prsId);
 
-       prsdata = (void *) DatumGetPointer(FunctionCall2(&prsobj->prsstart,
-                                                                                                        PointerGetDatum(buf),
-                                                                                                        Int32GetDatum(buflen)));
+       prsdata = DatumGetPointer(FunctionCall2(&prsobj->prsstart,
+                                                                                       PointerGetDatum(buf),
+                                                                                       Int32GetDatum(buflen)));
 
        LexizeInit(&ldata, cfg);
 
@@ -552,9 +552,9 @@ hlparsetext(Oid cfgId, HeadlineParsedText *prs, TSQuery query, char *buf, int bu
        cfg = lookup_ts_config_cache(cfgId);
        prsobj = lookup_ts_parser_cache(cfg->prsId);
 
-       prsdata = (void *) DatumGetPointer(FunctionCall2(&(prsobj->prsstart),
-                                                                                                        PointerGetDatum(buf),
-                                                                                                        Int32GetDatum(buflen)));
+       prsdata = DatumGetPointer(FunctionCall2(&(prsobj->prsstart),
+                                                                                       PointerGetDatum(buf),
+                                                                                       Int32GetDatum(buflen)));
 
        LexizeInit(&ldata, cfg);
 
index bc9fb38426c669f7110fab89b5b6ff3836effc60..a0e4408b9a5d8ed218c2195c04b16d1a10e15384 100644 (file)
@@ -63,7 +63,7 @@ tt_setup_firstcall(FuncCallContext *funcctx, FunctionCallInfo fcinfo,
        /* lextype takes one dummy argument */
        st->list = (LexDescr *) DatumGetPointer(OidFunctionCall1(prs->lextypeOid,
                                                                                                                         (Datum) 0));
-       funcctx->user_fctx = (void *) st;
+       funcctx->user_fctx = st;
 
        if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
                elog(ERROR, "return type must be a row type");
@@ -178,9 +178,9 @@ prs_setup_firstcall(FuncCallContext *funcctx, FunctionCallInfo fcinfo,
        st->len = 16;
        st->list = (LexemeEntry *) palloc(sizeof(LexemeEntry) * st->len);
 
-       prsdata = (void *) DatumGetPointer(FunctionCall2(&prs->prsstart,
-                                                                                                        PointerGetDatum(VARDATA_ANY(txt)),
-                                                                                                        Int32GetDatum(VARSIZE_ANY_EXHDR(txt))));
+       prsdata = DatumGetPointer(FunctionCall2(&prs->prsstart,
+                                                                                       PointerGetDatum(VARDATA_ANY(txt)),
+                                                                                       Int32GetDatum(VARSIZE_ANY_EXHDR(txt))));
 
        while ((type = DatumGetInt32(FunctionCall3(&prs->prstoken,
                                                                                           PointerGetDatum(prsdata),
index 2a716cc6b7f376337ec9cbffbf68dcb37cb1875e..583d6e7f89dbf826f836fd8593ba2f718f019920 100644 (file)
@@ -1808,7 +1808,7 @@ aclexplode(PG_FUNCTION_ARGS)
                idx = (int *) palloc(sizeof(int[2]));
                idx[0] = 0;                             /* ACL array item index */
                idx[1] = -1;                    /* privilege type counter */
-               funcctx->user_fctx = (void *) idx;
+               funcctx->user_fctx = idx;
 
                MemoryContextSwitchTo(oldcontext);
        }
index d053808f6ee8ff452420bba23eb6811a5d9c43fe..304a93112e281ec487ae31c94a467a93ce5f4818 100644 (file)
@@ -685,7 +685,7 @@ array_agg_serialize(PG_FUNCTION_ARGS)
                                                                        &typisvarlena);
                        fmgr_info_cxt(typsend, &iodata->typsend,
                                                  fcinfo->flinfo->fn_mcxt);
-                       fcinfo->flinfo->fn_extra = (void *) iodata;
+                       fcinfo->flinfo->fn_extra = iodata;
                }
 
                for (i = 0; i < state->nelems; i++)
@@ -776,7 +776,7 @@ array_agg_deserialize(PG_FUNCTION_ARGS)
                                                                   &iodata->typioparam);
                        fmgr_info_cxt(typreceive, &iodata->typreceive,
                                                  fcinfo->flinfo->fn_mcxt);
-                       fcinfo->flinfo->fn_extra = (void *) iodata;
+                       fcinfo->flinfo->fn_extra = iodata;
                }
 
                for (int i = 0; i < nelems; i++)
@@ -1642,7 +1642,7 @@ array_shuffle(PG_FUNCTION_ARGS)
        if (typentry == NULL || typentry->type_id != elmtyp)
        {
                typentry = lookup_type_cache(elmtyp, 0);
-               fcinfo->flinfo->fn_extra = (void *) typentry;
+               fcinfo->flinfo->fn_extra = typentry;
        }
 
        result = array_shuffle_n(array, ARR_DIMS(array)[0], true, elmtyp, typentry);
@@ -1678,7 +1678,7 @@ array_sample(PG_FUNCTION_ARGS)
        if (typentry == NULL || typentry->type_id != elmtyp)
        {
                typentry = lookup_type_cache(elmtyp, 0);
-               fcinfo->flinfo->fn_extra = (void *) typentry;
+               fcinfo->flinfo->fn_extra = typentry;
        }
 
        result = array_shuffle_n(array, n, false, elmtyp, typentry);
index a715e7e0b8ecfb726bfae26969ef070268e42cbc..593775c27f3ea98761b03a166ba8210c5177cb01 100644 (file)
@@ -3863,7 +3863,7 @@ array_eq(PG_FUNCTION_ARGS)
                                                (errcode(ERRCODE_UNDEFINED_FUNCTION),
                                                 errmsg("could not identify an equality operator for type %s",
                                                                format_type_be(element_type))));
-                       fcinfo->flinfo->fn_extra = (void *) typentry;
+                       fcinfo->flinfo->fn_extra = typentry;
                }
                typlen = typentry->typlen;
                typbyval = typentry->typbyval;
@@ -4027,7 +4027,7 @@ array_cmp(FunctionCallInfo fcinfo)
                                        (errcode(ERRCODE_UNDEFINED_FUNCTION),
                                         errmsg("could not identify a comparison function for type %s",
                                                        format_type_be(element_type))));
-               fcinfo->flinfo->fn_extra = (void *) typentry;
+               fcinfo->flinfo->fn_extra = typentry;
        }
        typlen = typentry->typlen;
        typbyval = typentry->typbyval;
@@ -4222,7 +4222,7 @@ hash_array(PG_FUNCTION_ARGS)
                        typentry = record_typentry;
                }
 
-               fcinfo->flinfo->fn_extra = (void *) typentry;
+               fcinfo->flinfo->fn_extra = typentry;
        }
 
        typlen = typentry->typlen;
@@ -4316,7 +4316,7 @@ hash_array_extended(PG_FUNCTION_ARGS)
                                        (errcode(ERRCODE_UNDEFINED_FUNCTION),
                                         errmsg("could not identify an extended hash function for type %s",
                                                        format_type_be(element_type))));
-               fcinfo->flinfo->fn_extra = (void *) typentry;
+               fcinfo->flinfo->fn_extra = typentry;
        }
        typlen = typentry->typlen;
        typbyval = typentry->typbyval;
@@ -4418,7 +4418,7 @@ array_contain_compare(AnyArrayType *array1, AnyArrayType *array2, Oid collation,
                                        (errcode(ERRCODE_UNDEFINED_FUNCTION),
                                         errmsg("could not identify an equality operator for type %s",
                                                        format_type_be(element_type))));
-               *fn_extra = (void *) typentry;
+               *fn_extra = typentry;
        }
        typlen = typentry->typlen;
        typbyval = typentry->typbyval;
@@ -6437,7 +6437,7 @@ array_replace_internal(ArrayType *array,
                                        (errcode(ERRCODE_UNDEFINED_FUNCTION),
                                         errmsg("could not identify an equality operator for type %s",
                                                        format_type_be(element_type))));
-               fcinfo->flinfo->fn_extra = (void *) typentry;
+               fcinfo->flinfo->fn_extra = typentry;
        }
        typlen = typentry->typlen;
        typbyval = typentry->typbyval;
@@ -6723,7 +6723,7 @@ width_bucket_array(PG_FUNCTION_ARGS)
                                                (errcode(ERRCODE_UNDEFINED_FUNCTION),
                                                 errmsg("could not identify a comparison function for type %s",
                                                                format_type_be(element_type))));
-                       fcinfo->flinfo->fn_extra = (void *) typentry;
+                       fcinfo->flinfo->fn_extra = typentry;
                }
 
                /*
index 600b59190e4766b6bb6ddafb49a7e0f8e558136a..0b19cddf54b59a01ef85727d41f5c6b1e886c5f9 100644 (file)
@@ -5031,7 +5031,7 @@ pg_timezone_abbrevs(PG_FUNCTION_ARGS)
                /* allocate memory for user context */
                pindex = (int *) palloc(sizeof(int));
                *pindex = 0;
-               funcctx->user_fctx = (void *) pindex;
+               funcctx->user_fctx = pindex;
 
                if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
                        elog(ERROR, "return type must be a row type");
index 45b854a0ae7374e3991c83d544e8c2c2cdec30c5..bd5b08e213770ef90687cdc329dd343237f350d3 100644 (file)
@@ -149,7 +149,7 @@ datumCopy(Datum value, bool typByVal, int typLen)
 
                        resultsize = EOH_get_flat_size(eoh);
                        resultptr = (char *) palloc(resultsize);
-                       EOH_flatten_into(eoh, (void *) resultptr, resultsize);
+                       EOH_flatten_into(eoh, resultptr, resultsize);
                        res = PointerGetDatum(resultptr);
                }
                else
@@ -495,7 +495,7 @@ datumSerialize(Datum value, bool isnull, bool typByVal, int typLen,
                         * so we can't store directly to *start_address.
                         */
                        tmp = (char *) palloc(header);
-                       EOH_flatten_into(eoh, (void *) tmp, header);
+                       EOH_flatten_into(eoh, tmp, header);
                        memcpy(*start_address, tmp, header);
                        *start_address += header;
 
index 21791105da8774edf6ce63be32f24ad2d6ce262f..901d887cd433d62af122882bb72d706357fdb69f 100644 (file)
@@ -255,7 +255,7 @@ domain_in(PG_FUNCTION_ARGS)
        {
                my_extra = domain_state_setup(domainType, false,
                                                                          fcinfo->flinfo->fn_mcxt);
-               fcinfo->flinfo->fn_extra = (void *) my_extra;
+               fcinfo->flinfo->fn_extra = my_extra;
        }
 
        /*
@@ -314,7 +314,7 @@ domain_recv(PG_FUNCTION_ARGS)
        {
                my_extra = domain_state_setup(domainType, true,
                                                                          fcinfo->flinfo->fn_mcxt);
-               fcinfo->flinfo->fn_extra = (void *) my_extra;
+               fcinfo->flinfo->fn_extra = my_extra;
        }
 
        /*
@@ -388,7 +388,7 @@ domain_check_internal(Datum value, bool isnull, Oid domainType,
        {
                my_extra = domain_state_setup(domainType, true, mcxt);
                if (extra)
-                       *extra = (void *) my_extra;
+                       *extra = my_extra;
        }
 
        /*
index 814c7fb4e3e2160f6f71eb8609db1f303472e353..d4c2aa0e7e9adafa5b1fd9419adb1a5660651a50 100644 (file)
@@ -295,7 +295,7 @@ enum_cmp_internal(Oid arg1, Oid arg2, FunctionCallInfo fcinfo)
                ReleaseSysCache(enum_tup);
                /* Now locate and remember the typcache entry */
                tcache = lookup_type_cache(typeoid, 0);
-               fcinfo->flinfo->fn_extra = (void *) tcache;
+               fcinfo->flinfo->fn_extra = tcache;
        }
 
        /* The remaining comparison logic is in typcache.c */
index 7e85ae3825eea49bb222798830fea8001c847a13..d2842495b5761484d8d68d94ccd33f3dee45ac4c 100644 (file)
@@ -161,7 +161,7 @@ make_expanded_record_from_typeid(Oid type_id, int32 typmod,
        {
                /* Register callback to release the refcount */
                erh->er_mcb.func = ER_mc_callback;
-               erh->er_mcb.arg = (void *) erh;
+               erh->er_mcb.arg = erh;
                MemoryContextRegisterResetCallback(erh->hdr.eoh_context,
                                                                                   &erh->er_mcb);
 
@@ -289,7 +289,7 @@ make_expanded_record_from_tupdesc(TupleDesc tupdesc,
        {
                /* Register callback to release the refcount */
                erh->er_mcb.func = ER_mc_callback;
-               erh->er_mcb.arg = (void *) erh;
+               erh->er_mcb.arg = erh;
                MemoryContextRegisterResetCallback(erh->hdr.eoh_context,
                                                                                   &erh->er_mcb);
 
@@ -385,7 +385,7 @@ make_expanded_record_from_exprecord(ExpandedRecordHeader *olderh,
        {
                /* Register callback to release the refcount */
                erh->er_mcb.func = ER_mc_callback;
-               erh->er_mcb.arg = (void *) erh;
+               erh->er_mcb.arg = erh;
                MemoryContextRegisterResetCallback(erh->hdr.eoh_context,
                                                                                   &erh->er_mcb);
 
@@ -844,7 +844,7 @@ expanded_record_fetch_tupdesc(ExpandedRecordHeader *erh)
                if (erh->er_mcb.arg == NULL)
                {
                        erh->er_mcb.func = ER_mc_callback;
-                       erh->er_mcb.arg = (void *) erh;
+                       erh->er_mcb.arg = erh;
                        MemoryContextRegisterResetCallback(erh->hdr.eoh_context,
                                                                                           &erh->er_mcb);
                }
index 928552d5514065d8fa8c20aab5606b4a0ea4cf30..d602df4eeb54077c841cfe9e9971721cd63a4ea1 100644 (file)
@@ -257,7 +257,7 @@ jsonb_from_cstring(char *json, int len, bool unique_keys, Node *escontext)
 
        state.unique_keys = unique_keys;
        state.escontext = escontext;
-       sem.semstate = (void *) &state;
+       sem.semstate = &state;
 
        sem.object_start = jsonb_in_object_start;
        sem.array_start = jsonb_in_array_start;
@@ -758,7 +758,7 @@ datum_to_jsonb_internal(Datum val, bool is_null, JsonbInState *result,
 
                                        memset(&sem, 0, sizeof(sem));
 
-                                       sem.semstate = (void *) result;
+                                       sem.semstate = result;
 
                                        sem.object_start = jsonb_in_object_start;
                                        sem.array_start = jsonb_in_array_start;
index 62a17a266798004fd36cea1c39a8e3ca0370e09a..68c0a31656e260fe60deca80415452ccd52063f5 100644 (file)
@@ -617,7 +617,7 @@ jsonb_object_keys(PG_FUNCTION_ARGS)
                }
 
                MemoryContextSwitchTo(oldcontext);
-               funcctx->user_fctx = (void *) state;
+               funcctx->user_fctx = state;
        }
 
        funcctx = SRF_PERCALL_SETUP();
@@ -752,7 +752,7 @@ json_object_keys(PG_FUNCTION_ARGS)
                state->sent_count = 0;
                state->result = palloc(256 * sizeof(char *));
 
-               sem->semstate = (void *) state;
+               sem->semstate = state;
                sem->array_start = okeys_array_start;
                sem->scalar = okeys_scalar;
                sem->object_field_start = okeys_object_field_start;
@@ -765,7 +765,7 @@ json_object_keys(PG_FUNCTION_ARGS)
                pfree(sem);
 
                MemoryContextSwitchTo(oldcontext);
-               funcctx->user_fctx = (void *) state;
+               funcctx->user_fctx = state;
        }
 
        funcctx = SRF_PERCALL_SETUP();
@@ -1123,7 +1123,7 @@ get_worker(text *json,
        if (npath > 0)
                state->pathok[0] = true;
 
-       sem->semstate = (void *) state;
+       sem->semstate = state;
 
        /*
         * Not all variants need all the semantic routines. Only set the ones that
@@ -1863,7 +1863,7 @@ json_array_length(PG_FUNCTION_ARGS)
 #endif
 
        sem = palloc0(sizeof(JsonSemAction));
-       sem->semstate = (void *) state;
+       sem->semstate = state;
        sem->object_start = alen_object_start;
        sem->scalar = alen_scalar;
        sem->array_element_start = alen_array_element_start;
@@ -2071,7 +2071,7 @@ each_worker(FunctionCallInfo fcinfo, bool as_text)
        state->tuple_store = rsi->setResult;
        state->ret_tdesc = rsi->setDesc;
 
-       sem->semstate = (void *) state;
+       sem->semstate = state;
        sem->array_start = each_array_start;
        sem->scalar = each_scalar;
        sem->object_field_start = each_object_field_start;
@@ -2323,7 +2323,7 @@ elements_worker(FunctionCallInfo fcinfo, const char *funcname, bool as_text)
        state->tuple_store = rsi->setResult;
        state->ret_tdesc = rsi->setDesc;
 
-       sem->semstate = (void *) state;
+       sem->semstate = state;
        sem->object_start = elements_object_start;
        sem->scalar = elements_scalar;
        sem->array_element_start = elements_array_element_start;
@@ -2795,7 +2795,7 @@ populate_array_json(PopulateArrayContext *ctx, const char *json, int len)
        state.ctx = ctx;
 
        memset(&sem, 0, sizeof(sem));
-       sem.semstate = (void *) &state;
+       sem.semstate = &state;
        sem.object_start = populate_array_object_start;
        sem.array_end = populate_array_array_end;
        sem.array_element_start = populate_array_element_start;
@@ -3831,7 +3831,7 @@ get_json_object_as_hash(const char *json, int len, const char *funcname,
        state->lex = makeJsonLexContextCstringLen(NULL, json, len,
                                                                                          GetDatabaseEncoding(), true);
 
-       sem->semstate = (void *) state;
+       sem->semstate = state;
        sem->array_start = hash_array_start;
        sem->scalar = hash_scalar;
        sem->object_field_start = hash_object_field_start;
@@ -4144,7 +4144,7 @@ populate_recordset_worker(FunctionCallInfo fcinfo, const char *funcname,
 
                makeJsonLexContext(&lex, json, true);
 
-               sem->semstate = (void *) state;
+               sem->semstate = state;
                sem->array_start = populate_recordset_array_start;
                sem->array_element_start = populate_recordset_array_element_start;
                sem->scalar = populate_recordset_scalar;
@@ -4504,7 +4504,7 @@ json_strip_nulls(PG_FUNCTION_ARGS)
        state->strval = makeStringInfo();
        state->skip_next_null = false;
 
-       sem->semstate = (void *) state;
+       sem->semstate = state;
        sem->object_start = sn_object_start;
        sem->object_end = sn_object_end;
        sem->array_start = sn_array_start;
@@ -5718,7 +5718,7 @@ iterate_json_values(text *json, uint32 flags, void *action_state,
        state->action_state = action_state;
        state->flags = flags;
 
-       sem->semstate = (void *) state;
+       sem->semstate = state;
        sem->scalar = iterate_values_scalar;
        sem->object_field_start = iterate_values_object_field_start;
 
@@ -5839,7 +5839,7 @@ transform_json_string_values(text *json, void *action_state,
        state->action = transform_action;
        state->action_state = action_state;
 
-       sem->semstate = (void *) state;
+       sem->semstate = state;
        sem->object_start = transform_string_values_object_start;
        sem->object_end = transform_string_values_object_end;
        sem->array_start = transform_string_values_array_start;
index ac2145980374216b0059ba2e285c204b760d766a..de35c8ce476afa2252e4e45358377d84eeee1702 100644 (file)
@@ -3615,7 +3615,7 @@ JsonbType(JsonbValue *jb)
 
        if (jb->type == jbvBinary)
        {
-               JsonbContainer *jbc = (void *) jb->val.binary.data;
+               JsonbContainer *jbc = jb->val.binary.data;
 
                /* Scalars should be always extracted during jsonpath execution. */
                Assert(!JsonContainerIsScalar(jbc));
index 7acda7783752a41e41ebd8b66a3f905759ff1831..8efad5ac1066cada1fb205b8a7eccd62b33c672c 100644 (file)
@@ -564,7 +564,7 @@ parsejsonpath(const char *str, int len, struct Node *escontext)
 
        jsonpath_scanner_init(str, len);
 
-       if (jsonpath_yyparse((void *) &parseresult, escontext) != 0)
+       if (jsonpath_yyparse(&parseresult, escontext) != 0)
                jsonpath_yyerror(NULL, escontext, "invalid input"); /* shouldn't happen */
 
        jsonpath_scanner_finish();
index e790f856ab37066d33145386f0a6c6ca530ea7e9..034a6f84716ecec1466ef7367358227b31375add 100644 (file)
@@ -153,7 +153,7 @@ pg_lock_status(PG_FUNCTION_ARGS)
                 * out as a result set.
                 */
                mystatus = (PG_Lock_Status *) palloc(sizeof(PG_Lock_Status));
-               funcctx->user_fctx = (void *) mystatus;
+               funcctx->user_fctx = mystatus;
 
                mystatus->lockData = GetLockStatusData();
                mystatus->currIdx = 0;
index 558c6c18c346630e67ae1ee98d8628e8153c5d16..35fd825babe2efe4d409f3d675bfcfd55932af8c 100644 (file)
@@ -458,7 +458,7 @@ get_multirange_io_data(FunctionCallInfo fcinfo, Oid mltrngtypid, IOFuncSelector
                fmgr_info_cxt(typiofunc, &cache->typioproc,
                                          fcinfo->flinfo->fn_mcxt);
 
-               fcinfo->flinfo->fn_extra = (void *) cache;
+               fcinfo->flinfo->fn_extra = cache;
        }
 
        return cache;
@@ -555,7 +555,7 @@ multirange_get_typcache(FunctionCallInfo fcinfo, Oid mltrngtypid)
                typcache = lookup_type_cache(mltrngtypid, TYPECACHE_MULTIRANGE_INFO);
                if (typcache->rngtype == NULL)
                        elog(ERROR, "type %u is not a multirange type", mltrngtypid);
-               fcinfo->flinfo->fn_extra = (void *) typcache;
+               fcinfo->flinfo->fn_extra = typcache;
        }
 
        return typcache;
index 04b3f31827e53ca22a93981432fe069282e4128d..b8bdc667dbcbb40f1af294872c222f73555d2d81 100644 (file)
@@ -270,7 +270,7 @@ ordered_set_startup(FunctionCallInfo fcinfo, bool use_tuples)
                                                                 &qstate->typAlign);
                }
 
-               fcinfo->flinfo->fn_extra = (void *) qstate;
+               fcinfo->flinfo->fn_extra = qstate;
 
                MemoryContextSwitchTo(oldcontext);
        }
index fe19007970d281aed8c57912924039a5af4d37b0..6062f21db48899cfad383ffe2ef7adfbc527e987 100644 (file)
@@ -92,7 +92,7 @@ pg_partition_tree(PG_FUNCTION_ARGS)
                funcctx->tuple_desc = tupdesc;
 
                /* The only state we need is the partition list */
-               funcctx->user_fctx = (void *) partitions;
+               funcctx->user_fctx = partitions;
 
                MemoryContextSwitchTo(oldcxt);
        }
@@ -219,7 +219,7 @@ pg_partition_ancestors(PG_FUNCTION_ARGS)
                ancestors = lcons_oid(relid, ancestors);
 
                /* The only state we need is the ancestors list */
-               funcctx->user_fctx = (void *) ancestors;
+               funcctx->user_fctx = ancestors;
 
                MemoryContextSwitchTo(oldcxt);
        }
index 2d94a6b877456d8799b554786b6e9150d49232cc..dc7143452225622a3a3733a162d84354f35172a8 100644 (file)
@@ -359,7 +359,7 @@ get_range_io_data(FunctionCallInfo fcinfo, Oid rngtypid, IOFuncSelector func)
                fmgr_info_cxt(typiofunc, &cache->typioproc,
                                          fcinfo->flinfo->fn_mcxt);
 
-               fcinfo->flinfo->fn_extra = (void *) cache;
+               fcinfo->flinfo->fn_extra = cache;
        }
 
        return cache;
@@ -1710,7 +1710,7 @@ range_get_typcache(FunctionCallInfo fcinfo, Oid rngtypid)
                typcache = lookup_type_cache(rngtypid, TYPECACHE_RANGE_INFO);
                if (typcache->rngelemtype == NULL)
                        elog(ERROR, "type %u is not a range type", rngtypid);
-               fcinfo->flinfo->fn_extra = (void *) typcache;
+               fcinfo->flinfo->fn_extra = typcache;
        }
 
        return typcache;
index 0e2519bfd57728b3bfe0e1013113aeab32cd2b76..42aec95738de7b54f2deb02fdf3b1ef4747f2308 100644 (file)
@@ -1367,7 +1367,7 @@ regexp_matches(PG_FUNCTION_ARGS)
                matchctx->nulls = (bool *) palloc(sizeof(bool) * matchctx->npatterns);
 
                MemoryContextSwitchTo(oldcontext);
-               funcctx->user_fctx = (void *) matchctx;
+               funcctx->user_fctx = matchctx;
        }
 
        funcctx = SRF_PERCALL_SETUP();
@@ -1707,7 +1707,7 @@ regexp_split_to_table(PG_FUNCTION_ARGS)
                                                                                false, true, true);
 
                MemoryContextSwitchTo(oldcontext);
-               funcctx->user_fctx = (void *) splitctx;
+               funcctx->user_fctx = splitctx;
        }
 
        funcctx = SRF_PERCALL_SETUP();
index 1438ff35209cbf79349e7ddde0f7231389f9d7a4..b6beb88db806155254e2504eaf5187c6fdaf25ce 100644 (file)
@@ -355,7 +355,7 @@ gtsvector_consistent(PG_FUNCTION_ARGS)
                chkval.arrb = GETARR(key);
                chkval.arre = chkval.arrb + ARRNELEM(key);
                PG_RETURN_BOOL(TS_execute(GETQUERY(query),
-                                                                 (void *) &chkval,
+                                                                 &chkval,
                                                                  TS_EXEC_PHRASE_NO_POS,
                                                                  checkcondition_arr));
        }
index d456a039510c80e40c6b6bd6afc5ae65c0a84b4c..586a9d6b8d3378d3a36e8b44a3371e23bdc55bd8 100644 (file)
@@ -185,7 +185,7 @@ SortAndUniqItems(TSQuery q, int *size)
        /* remove duplicates */
        while (ptr - res < *size)
        {
-               if (compareQueryOperand((void *) ptr, (void *) prevptr, (void *) operand) != 0)
+               if (compareQueryOperand(ptr, prevptr, operand) != 0)
                {
                        prevptr++;
                        *prevptr = *ptr;
@@ -671,7 +671,7 @@ Cover(DocRepresentation *doc, int len, QueryRepresentation *qr, CoverExt *ext)
        {
                fillQueryRepresentationData(qr, ptr);
 
-               if (TS_execute(GETQUERY(qr->query), (void *) qr,
+               if (TS_execute(GETQUERY(qr->query), qr,
                                           TS_EXEC_EMPTY, checkcondition_QueryOperand))
                {
                        if (WEP_GETPOS(ptr->pos) > ext->q)
@@ -701,7 +701,7 @@ Cover(DocRepresentation *doc, int len, QueryRepresentation *qr, CoverExt *ext)
                 */
                fillQueryRepresentationData(qr, ptr);
 
-               if (TS_execute(GETQUERY(qr->query), (void *) qr,
+               if (TS_execute(GETQUERY(qr->query), qr,
                                           TS_EXEC_EMPTY, checkcondition_QueryOperand))
                {
                        if (WEP_GETPOS(ptr->pos) < ext->p)
index 687adcbd69f30a3b39ed4f0ac214e38039d67e6b..f75e25388ca4b54a9f3c4a656af790cf58b20283 100644 (file)
@@ -2452,7 +2452,7 @@ ts_setup_firstcall(FunctionCallInfo fcinfo, FuncCallContext *funcctx,
        MemoryContext oldcontext;
        StatEntry  *node;
 
-       funcctx->user_fctx = (void *) stat;
+       funcctx->user_fctx = stat;
 
        oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
 
index 040a89626391ee13cab79b699ef00adb1561febb..4ad5e04f48a511df00693c7451848ae299dbc004 100644 (file)
@@ -1226,7 +1226,7 @@ pg_xml_init(PgXmlStrictness strictness)
        errcxt->saved_errcxt = xmlGenericErrorContext;
 #endif
 
-       xmlSetStructuredErrorFunc((void *) errcxt, xml_errorHandler);
+       xmlSetStructuredErrorFunc(errcxt, xml_errorHandler);
 
        /*
         * Verify that xmlSetStructuredErrorFunc set the context variable we
@@ -1248,7 +1248,7 @@ pg_xml_init(PgXmlStrictness strictness)
        new_errcxt = xmlGenericErrorContext;
 #endif
 
-       if (new_errcxt != (void *) errcxt)
+       if (new_errcxt != errcxt)
                ereport(ERROR,
                                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                 errmsg("could not set up XML error handler"),
@@ -1302,7 +1302,7 @@ pg_xml_done(PgXmlErrorContext *errcxt, bool isError)
        cur_errcxt = xmlGenericErrorContext;
 #endif
 
-       if (cur_errcxt != (void *) errcxt)
+       if (cur_errcxt != errcxt)
                elog(WARNING, "libxml error handling state is out of sync with xml.c");
 
        /* Restore the saved handlers */
@@ -2197,7 +2197,7 @@ xml_errorHandler(void *data, PgXmlErrorPtr error)
                xmlGenericErrorFunc errFuncSaved = xmlGenericError;
                void       *errCtxSaved = xmlGenericErrorContext;
 
-               xmlSetGenericErrorFunc((void *) errorBuf,
+               xmlSetGenericErrorFunc(errorBuf,
                                                           (xmlGenericErrorFunc) appendStringInfo);
 
                /* Add context information to errorBuf */
@@ -4885,7 +4885,7 @@ XmlTableFetchRow(TableFuncScanState *state)
        xtCxt = GetXmlTableBuilderPrivateData(state, "XmlTableFetchRow");
 
        /* Propagate our own error context to libxml2 */
-       xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler);
+       xmlSetStructuredErrorFunc(xtCxt->xmlerrcxt, xml_errorHandler);
 
        if (xtCxt->xpathobj == NULL)
        {
@@ -4939,7 +4939,7 @@ XmlTableGetValue(TableFuncScanState *state, int colnum,
                   xtCxt->xpathobj->nodesetval != NULL);
 
        /* Propagate our own error context to libxml2 */
-       xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler);
+       xmlSetStructuredErrorFunc(xtCxt->xmlerrcxt, xml_errorHandler);
 
        *isnull = false;
 
@@ -5082,7 +5082,7 @@ XmlTableDestroyOpaque(TableFuncScanState *state)
        xtCxt = GetXmlTableBuilderPrivateData(state, "XmlTableDestroyOpaque");
 
        /* Propagate our own error context to libxml2 */
-       xmlSetStructuredErrorFunc((void *) xtCxt->xmlerrcxt, xml_errorHandler);
+       xmlSetStructuredErrorFunc(xtCxt->xmlerrcxt, xml_errorHandler);
 
        if (xtCxt->xpathscomp != NULL)
        {
index 5af1a168ec2f7643466e01f055967aedc10a55d7..c66a088f40671230878609dc2221bbc7782c76b9 100644 (file)
@@ -1907,8 +1907,7 @@ ScanQueryForLocks(Query *parsetree, bool acquire)
         */
        if (parsetree->hasSubLinks)
        {
-               query_tree_walker(parsetree, ScanQueryWalker,
-                                                 (void *) &acquire,
+               query_tree_walker(parsetree, ScanQueryWalker, &acquire,
                                                  QTW_IGNORE_RC_SUBQUERIES);
        }
 }
@@ -1934,8 +1933,7 @@ ScanQueryWalker(Node *node, bool *acquire)
         * Do NOT recurse into Query nodes, because ScanQueryForLocks already
         * processed subselects of subselects for us.
         */
-       return expression_tree_walker(node, ScanQueryWalker,
-                                                                 (void *) acquire);
+       return expression_tree_walker(node, ScanQueryWalker, acquire);
 }
 
 /*
index 1972bd1944b6bbd447922b415eebd2e78e62f8b6..6590cbe5c67a44325d223bde249e17efb8db7dad 100644 (file)
@@ -1407,7 +1407,7 @@ InitDomainConstraintRef(Oid type_id, DomainConstraintRef *ref,
        ref->refctx = refctx;
        ref->dcc = NULL;
        ref->callback.func = dccref_deletion_callback;
-       ref->callback.arg = (void *) ref;
+       ref->callback.arg = ref;
        MemoryContextRegisterResetCallback(refctx, &ref->callback);
        /* Acquire refcount if there are constraints, and set up exported list */
        if (ref->tcache->domainData)
index b1a419d535c0ed41ed12ed3587bc86243754d5b9..289059435a99c8dde7842b7e7b5d1c187baeabda 100644 (file)
@@ -2285,7 +2285,7 @@ check_log_destination(char **newval, void **extra, GucSource source)
 
        myextra = (int *) guc_malloc(ERROR, sizeof(int));
        *myextra = newlogdest;
-       *extra = (void *) myextra;
+       *extra = myextra;
 
        return true;
 }
index 5d9c62b652ad89bf06b55298aa90087e42d1714f..493eae4f4b024a248e3ec353903ec55e37d0e65f 100644 (file)
@@ -1038,7 +1038,7 @@ hash_search_with_hash_value(HTAB *hashp,
        {
                case HASH_FIND:
                        if (currBucket != NULL)
-                               return (void *) ELEMENTKEY(currBucket);
+                               return ELEMENTKEY(currBucket);
                        return NULL;
 
                case HASH_REMOVE:
@@ -1067,7 +1067,7 @@ hash_search_with_hash_value(HTAB *hashp,
                                 * element, because someone else is going to reuse it the next
                                 * time something is added to the table
                                 */
-                               return (void *) ELEMENTKEY(currBucket);
+                               return ELEMENTKEY(currBucket);
                        }
                        return NULL;
 
@@ -1075,7 +1075,7 @@ hash_search_with_hash_value(HTAB *hashp,
                case HASH_ENTER_NULL:
                        /* Return existing element if found, else create one */
                        if (currBucket != NULL)
-                               return (void *) ELEMENTKEY(currBucket);
+                               return ELEMENTKEY(currBucket);
 
                        /* disallow inserts if frozen */
                        if (hashp->frozen)
@@ -1114,7 +1114,7 @@ hash_search_with_hash_value(HTAB *hashp,
                         * caller's data structure.
                         */
 
-                       return (void *) ELEMENTKEY(currBucket);
+                       return ELEMENTKEY(currBucket);
        }
 
        elog(ERROR, "unrecognized hash action code: %d", (int) action);
@@ -1453,7 +1453,7 @@ hash_seq_search(HASH_SEQ_STATUS *status)
                status->curEntry = curElem->link;
                if (status->curEntry == NULL)   /* end of this bucket */
                        ++status->curBucket;
-               return (void *) ELEMENTKEY(curElem);
+               return ELEMENTKEY(curElem);
        }
 
        /*
@@ -1507,7 +1507,7 @@ hash_seq_search(HASH_SEQ_STATUS *status)
        if (status->curEntry == NULL)   /* end of this bucket */
                ++curBucket;
        status->curBucket = curBucket;
-       return (void *) ELEMENTKEY(curElem);
+       return ELEMENTKEY(curElem);
 }
 
 void
index bde54326c6604fa409984fd0598dd608094b6327..70d33226cb9da148c7f1db14ea27a16dd49f926d 100644 (file)
@@ -886,7 +886,7 @@ MemoryContextStatsInternal(MemoryContext context, int level,
        /* Examine the context itself */
        context->methods->stats(context,
                                                        MemoryContextStatsPrint,
-                                                       (void *) &level,
+                                                       &level,
                                                        totals, print_to_stderr);
 
        /*
index 558309c98500aec4d174ba5532b620a54dd960af..e07ba4ea4b11d4f2d110945df3439e2fa5a998fe 100644 (file)
@@ -664,7 +664,7 @@ tuplesort_puttupleslot(Tuplesortstate *state, TupleTableSlot *slot)
 
        /* copy the tuple into sort storage */
        tuple = ExecCopySlotMinimalTuple(slot);
-       stup.tuple = (void *) tuple;
+       stup.tuple = tuple;
        /* set up first-column key value */
        htup.t_len = tuple->t_len + MINIMAL_TUPLE_OFFSET;
        htup.t_data = (HeapTupleHeader) ((char *) tuple - MINIMAL_TUPLE_OFFSET);
@@ -702,7 +702,7 @@ tuplesort_putheaptuple(Tuplesortstate *state, HeapTuple tup)
 
        /* copy the tuple into sort storage */
        tup = heap_copytuple(tup);
-       stup.tuple = (void *) tup;
+       stup.tuple = tup;
 
        /*
         * set up first-column key value, and potentially abbreviate, if it's a
@@ -1175,7 +1175,7 @@ readtup_heap(Tuplesortstate *state, SortTuple *stup,
        LogicalTapeReadExact(tape, tupbody, tupbodylen);
        if (base->sortopt & TUPLESORT_RANDOMACCESS) /* need trailing length word? */
                LogicalTapeReadExact(tape, &tuplen, sizeof(tuplen));
-       stup->tuple = (void *) tuple;
+       stup->tuple = tuple;
        /* set up first-column key value */
        htup.t_len = tuple->t_len + MINIMAL_TUPLE_OFFSET;
        htup.t_data = (HeapTupleHeader) ((char *) tuple - MINIMAL_TUPLE_OFFSET);
@@ -1372,7 +1372,7 @@ readtup_cluster(Tuplesortstate *state, SortTuple *stup,
        LogicalTapeReadExact(tape, tuple->t_data, tuple->t_len);
        if (base->sortopt & TUPLESORT_RANDOMACCESS) /* need trailing length word? */
                LogicalTapeReadExact(tape, &tuplen, sizeof(tuplen));
-       stup->tuple = (void *) tuple;
+       stup->tuple = tuple;
        /* set up first-column key value, if it's a simple column */
        if (base->haveDatum1)
                stup->datum1 = heap_getattr(tuple,
@@ -1681,7 +1681,7 @@ readtup_index(Tuplesortstate *state, SortTuple *stup,
        LogicalTapeReadExact(tape, tuple, tuplen);
        if (base->sortopt & TUPLESORT_RANDOMACCESS) /* need trailing length word? */
                LogicalTapeReadExact(tape, &tuplen, sizeof(tuplen));
-       stup->tuple = (void *) tuple;
+       stup->tuple = tuple;
        /* set up first-column key value */
        stup->datum1 = index_getattr(tuple,
                                                                 1,
@@ -1757,7 +1757,7 @@ readtup_index_brin(Tuplesortstate *state, SortTuple *stup,
        LogicalTapeReadExact(tape, &tuple->tuple, tuplen);
        if (base->sortopt & TUPLESORT_RANDOMACCESS) /* need trailing length word? */
                LogicalTapeReadExact(tape, &tuplen, sizeof(tuplen));
-       stup->tuple = (void *) tuple;
+       stup->tuple = tuple;
 
        /* set up first-column key value, which is block number */
        stup->datum1 = tuple->tuple.bt_blkno;
index a720d7020016861e82cbdbfbe5270072dc6ce3e3..62c98de2086dcd36a0ded3a1f9b3f6447b11f468 100644 (file)
@@ -751,7 +751,7 @@ tuplestore_puttupleslot(Tuplestorestate *state,
        tuple = ExecCopySlotMinimalTuple(slot);
        USEMEM(state, GetMemoryChunkSpace(tuple));
 
-       tuplestore_puttuple_common(state, (void *) tuple);
+       tuplestore_puttuple_common(state, tuple);
 
        MemoryContextSwitchTo(oldcxt);
 }
@@ -771,7 +771,7 @@ tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple)
         */
        tuple = COPYTUP(state, tuple);
 
-       tuplestore_puttuple_common(state, (void *) tuple);
+       tuplestore_puttuple_common(state, tuple);
 
        MemoryContextSwitchTo(oldcxt);
 }
@@ -790,7 +790,7 @@ tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc,
        tuple = heap_form_minimal_tuple(tdesc, values, isnull);
        USEMEM(state, GetMemoryChunkSpace(tuple));
 
-       tuplestore_puttuple_common(state, (void *) tuple);
+       tuplestore_puttuple_common(state, tuple);
 
        MemoryContextSwitchTo(oldcxt);
 }
@@ -1592,7 +1592,7 @@ copytup_heap(Tuplestorestate *state, void *tup)
 
        tuple = minimal_tuple_from_heap_tuple((HeapTuple) tup);
        USEMEM(state, GetMemoryChunkSpace(tuple));
-       return (void *) tuple;
+       return tuple;
 }
 
 static void
@@ -1629,5 +1629,5 @@ readtup_heap(Tuplestorestate *state, unsigned int len)
        BufFileReadExact(state->myfile, tupbody, tupbodylen);
        if (state->backward)            /* need trailing length word? */
                BufFileReadExact(state->myfile, &tuplen, sizeof(tuplen));
-       return (void *) tuple;
+       return tuple;
 }
index 33182d5b445e6925392d9245c9df654bb433277c..59e7941a0c3b52eddff4fe1008e7a2b9175d8df3 100644 (file)
@@ -1466,7 +1466,7 @@ StartRestoreLO(ArchiveHandle *AH, Oid oid, bool drop)
        {
                /* First time through (in this process) so allocate the buffer */
                AH->lo_buf_size = LOBBUFSIZE;
-               AH->lo_buf = (void *) pg_malloc(LOBBUFSIZE);
+               AH->lo_buf = pg_malloc(LOBBUFSIZE);
        }
        AH->lo_buf_used = 0;
 
@@ -2182,7 +2182,7 @@ ReadStr(ArchiveHandle *AH)
        else
        {
                buf = (char *) pg_malloc(l + 1);
-               AH->ReadBufPtr(AH, (void *) buf, l);
+               AH->ReadBufPtr(AH, buf, l);
 
                buf[l] = '\0';
        }
index ecaad7321a308bcc046a2b6be26a2fe9043c474b..e44b887eb29bdbec2b5c8cce51dec98da303dc94 100644 (file)
@@ -137,7 +137,7 @@ InitArchiveFmt_Custom(ArchiveHandle *AH)
 
        /* Set up a private area. */
        ctx = (lclContext *) pg_malloc0(sizeof(lclContext));
-       AH->formatData = (void *) ctx;
+       AH->formatData = ctx;
 
        /*
         * Now open the file
@@ -205,7 +205,7 @@ _ArchiveEntry(ArchiveHandle *AH, TocEntry *te)
        else
                ctx->dataState = K_OFFSET_NO_DATA;
 
-       te->formatData = (void *) ctx;
+       te->formatData = ctx;
 }
 
 /*
@@ -241,7 +241,7 @@ _ReadExtraToc(ArchiveHandle *AH, TocEntry *te)
        if (ctx == NULL)
        {
                ctx = (lclTocEntry *) pg_malloc0(sizeof(lclTocEntry));
-               te->formatData = (void *) ctx;
+               te->formatData = ctx;
        }
 
        ctx->dataState = ReadOffset(AH, &(ctx->dataPos));
index 7be8d5487d4b2c01025738f8fa05bd246c8304d1..cb82f8734edaf43f6cacd1dd6acfa58d60b46af3 100644 (file)
@@ -140,7 +140,7 @@ InitArchiveFmt_Directory(ArchiveHandle *AH)
 
        /* Set up our private context */
        ctx = (lclContext *) pg_malloc0(sizeof(lclContext));
-       AH->formatData = (void *) ctx;
+       AH->formatData = ctx;
 
        ctx->dataFH = NULL;
        ctx->LOsTocFH = NULL;
@@ -246,7 +246,7 @@ _ArchiveEntry(ArchiveHandle *AH, TocEntry *te)
        else
                tctx->filename = NULL;
 
-       te->formatData = (void *) tctx;
+       te->formatData = tctx;
 }
 
 /*
@@ -285,7 +285,7 @@ _ReadExtraToc(ArchiveHandle *AH, TocEntry *te)
        if (tctx == NULL)
        {
                tctx = (lclTocEntry *) pg_malloc0(sizeof(lclTocEntry));
-               te->formatData = (void *) tctx;
+               te->formatData = tctx;
        }
 
        tctx->filename = ReadStr(AH);
index 41ee52b1d69cce369ad4231188a2a7cff0811c06..b5ba3b46dd999f5578caed6d2237388d2078c72c 100644 (file)
@@ -152,7 +152,7 @@ InitArchiveFmt_Tar(ArchiveHandle *AH)
         * Set up some special context used in compressing data.
         */
        ctx = pg_malloc0_object(lclContext);
-       AH->formatData = (void *) ctx;
+       AH->formatData = ctx;
        ctx->filePos = 0;
        ctx->isSpecialScript = 0;
 
@@ -219,7 +219,7 @@ InitArchiveFmt_Tar(ArchiveHandle *AH)
 
                ctx->hasSeek = checkSeek(ctx->tarFH);
 
-               ctx->FH = (void *) tarOpen(AH, "toc.dat", 'r');
+               ctx->FH = tarOpen(AH, "toc.dat", 'r');
                ReadHead(AH);
                ReadToc(AH);
                tarClose(AH, ctx->FH);  /* Nothing else in the file... */
@@ -247,7 +247,7 @@ _ArchiveEntry(ArchiveHandle *AH, TocEntry *te)
                ctx->filename = NULL;
                ctx->TH = NULL;
        }
-       te->formatData = (void *) ctx;
+       te->formatData = ctx;
 }
 
 static void
@@ -269,7 +269,7 @@ _ReadExtraToc(ArchiveHandle *AH, TocEntry *te)
        if (ctx == NULL)
        {
                ctx = pg_malloc0_object(lclTocEntry);
-               te->formatData = (void *) ctx;
+               te->formatData = ctx;
        }
 
        ctx->filename = ReadStr(AH);
index c24e38d988c731bf76cf0707d825fde842e4e4a2..4cf5603353d70619ba5cd0649189903dd62f211b 100644 (file)
@@ -69,7 +69,7 @@ MainLoop(FILE *source)
        /* Create working state */
        scan_state = psql_scan_create(&psqlscan_callbacks);
        cond_stack = conditional_stack_create();
-       psql_scan_set_passthrough(scan_state, (void *) cond_stack);
+       psql_scan_set_passthrough(scan_state, cond_stack);
 
        query_buf = createPQExpBuffer();
        previous_buf = createPQExpBuffer();
index 036caaec2ffca47343b1167fcad0f8963a5fbfd0..db30ddc94da027f72eba846529776b4d5ce5070b 100644 (file)
@@ -399,7 +399,7 @@ main(int argc, char *argv[])
                                                                cell->val, strlen(cell->val),
                                                                pset.encoding, standard_strings());
                                cond_stack = conditional_stack_create();
-                               psql_scan_set_passthrough(scan_state, (void *) cond_stack);
+                               psql_scan_set_passthrough(scan_state, cond_stack);
 
                                successResult = HandleSlashCmds(scan_state,
                                                                                                cond_stack,
index c114c6419d009a6df4402c9a8c7388f0f8866175..49fc6cfc50b9427ad2dbd595ee08de72e6dbe7cd 100644 (file)
@@ -44,7 +44,7 @@ extern bool pg_prng_seed_check(pg_prng_state *state);
  * pg_strong_random.c and thence OpenSSL.
  */
 #define pg_prng_strong_seed(state) \
-       (pg_strong_random((void *) (state), sizeof(pg_prng_state)) ? \
+       (pg_strong_random(state, sizeof(pg_prng_state)) ? \
         pg_prng_seed_check(state) : false)
 
 extern uint64 pg_prng_uint64(pg_prng_state *state);
index b24b310ce59d48404f864e5e6f1b15dfb0545012..2bbb70333dcb46605a57b0e9ef8bc7ab467e2045 100644 (file)
@@ -667,7 +667,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
 
        this->autocommit = autocommit;
 
-       PQsetNoticeReceiver(this->connection, &ECPGnoticeReceiver, (void *) this);
+       PQsetNoticeReceiver(this->connection, &ECPGnoticeReceiver, this);
 
        return true;
 }
index aee888432f0a610c08e13660e430be9fd5706213..8525a6812f2ee163f4b5f1f86df174ea24144806 100644 (file)
@@ -435,7 +435,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
                                /* allocate storage if needed */
                                if (arrsize == 0 && *(void **) var == NULL)
                                {
-                                       void       *mem = (void *) ecpg_auto_alloc(offset * ntuples, lineno);
+                                       void       *mem = ecpg_auto_alloc(offset * ntuples, lineno);
 
                                        if (!mem)
                                        {
@@ -540,7 +540,7 @@ ECPGget_desc(int lineno, const char *desc_name, int index,...)
                /* allocate storage if needed */
                if (data_var.ind_arrsize == 0 && data_var.ind_value == NULL)
                {
-                       void       *mem = (void *) ecpg_auto_alloc(data_var.ind_offset * ntuples, lineno);
+                       void       *mem = ecpg_auto_alloc(data_var.ind_offset * ntuples, lineno);
 
                        if (!mem)
                        {
index a83637ac75836fcca9a5d0a71375438fe6fee3f2..6979be2c988acd4cc63339ee1fefd9cd97096bb9 100644 (file)
@@ -100,7 +100,7 @@ set_auto_allocs(struct auto_mem *am)
 char *
 ecpg_auto_alloc(long size, int lineno)
 {
-       void       *ptr = (void *) ecpg_alloc(size, lineno);
+       void       *ptr = ecpg_alloc(size, lineno);
 
        if (!ptr)
                return NULL;
index 5633e3c7905b836409db11d857cce673c73b995b..6255a86d75b561ee869a18cb2d5068bddb0e6da0 100644 (file)
@@ -229,7 +229,7 @@ recheck:
        /*
         * Save pointer in FmgrInfo to avoid search on subsequent calls
         */
-       fcinfo->flinfo->fn_extra = (void *) function;
+       fcinfo->flinfo->fn_extra = function;
 
        /*
         * Finally return the compiled function
@@ -1079,7 +1079,7 @@ plpgsql_parser_setup(struct ParseState *pstate, PLpgSQL_expr *expr)
        pstate->p_post_columnref_hook = plpgsql_post_column_ref;
        pstate->p_paramref_hook = plpgsql_param_ref;
        /* no need to use p_coerce_param_hook */
-       pstate->p_ref_hook_state = (void *) expr;
+       pstate->p_ref_hook_state = expr;
 }
 
 /*
index 86c5bd324a978367127932275473c5b35696f423..e31206e7f4cab41cfcabad932aeba2c5075f67ac 100644 (file)
@@ -863,7 +863,7 @@ coerce_function_result_tuple(PLpgSQL_execstate *estate, TupleDesc tupdesc)
 
                        resultsize = EOH_get_flat_size(&erh->hdr);
                        tuphdr = (HeapTupleHeader) SPI_palloc(resultsize);
-                       EOH_flatten_into(&erh->hdr, (void *) tuphdr, resultsize);
+                       EOH_flatten_into(&erh->hdr, tuphdr, resultsize);
                        HeapTupleHeaderSetTypeId(tuphdr, tupdesc->tdtypeid);
                        HeapTupleHeaderSetTypMod(tuphdr, tupdesc->tdtypmod);
                        estate->retval = PointerGetDatum(tuphdr);
@@ -4026,7 +4026,7 @@ plpgsql_estate_setup(PLpgSQL_execstate *estate,
        /* initialize our ParamListInfo with appropriate hook functions */
        estate->paramLI = makeParamList(0);
        estate->paramLI->paramFetch = plpgsql_param_fetch;
-       estate->paramLI->paramFetchArg = (void *) estate;
+       estate->paramLI->paramFetchArg = estate;
        estate->paramLI->paramCompile = plpgsql_param_compile;
        estate->paramLI->paramCompileArg = NULL;        /* not needed */
        estate->paramLI->parserSetup = (ParserSetupHook) plpgsql_parser_setup;
@@ -4185,7 +4185,7 @@ exec_prepare_plan(PLpgSQL_execstate *estate,
         */
        memset(&options, 0, sizeof(options));
        options.parserSetup = (ParserSetupHook) plpgsql_parser_setup;
-       options.parserSetupArg = (void *) expr;
+       options.parserSetupArg = expr;
        options.parseMode = expr->parseMode;
        options.cursorOptions = cursorOptions;
        plan = SPI_prepare_extended(expr->query, &options);
@@ -6172,7 +6172,7 @@ exec_eval_simple_expr(PLpgSQL_execstate *estate,
         * possibly setting ecxt_param_list_info to NULL; we've already forced use
         * of a generic plan.
         */
-       paramLI->parserSetupArg = (void *) expr;
+       paramLI->parserSetupArg = expr;
        econtext->ecxt_param_list_info = paramLI;
 
        /*
@@ -6281,7 +6281,7 @@ setup_param_list(PLpgSQL_execstate *estate, PLpgSQL_expr *expr)
                 * Callers must save and restore parserSetupArg if there is any chance
                 * that they are interrupting an active use of parameters.
                 */
-               paramLI->parserSetupArg = (void *) expr;
+               paramLI->parserSetupArg = expr;
 
                /*
                 * Also make sure this is set before parser hooks need it.  There is
index adfbbc8a7b7ec7006fefa0246d85eda0f6315df2..b18a3d0b97b111e55591df787143d015e7f1fdc5 100644 (file)
@@ -118,7 +118,7 @@ plpgsql_extra_checks_check_hook(char **newvalue, void **extra, GucSource source)
        if (!myextra)
                return false;
        *myextra = extrachecks;
-       *extra = (void *) myextra;
+       *extra = myextra;
 
        return true;
 }
index 9d59473d6adcc9aa0e5ae6100f0a4fd5f3c4f943..0e84bb90829ec27c4323cb4a4d3b979713a65807 100644 (file)
@@ -80,10 +80,10 @@ PLy_exec_function(FunctionCallInfo fcinfo, PLyProcedure *proc)
                                                                                   sizeof(PLySRFState));
                                /* Immediately register cleanup callback */
                                srfstate->callback.func = plpython_srf_cleanup_callback;
-                               srfstate->callback.arg = (void *) srfstate;
+                               srfstate->callback.arg = srfstate;
                                MemoryContextRegisterResetCallback(funcctx->multi_call_memory_ctx,
                                                                                                   &srfstate->callback);
-                               funcctx->user_fctx = (void *) srfstate;
+                               funcctx->user_fctx = srfstate;
                        }
                        /* Every call setup */
                        funcctx = SRF_PERCALL_SETUP();
index 0b342b5c2bbba131aeae163d81208809e74de451..e01c0c9de936e70f7fdb6cc2b5e005af2e613150 100644 (file)
@@ -178,7 +178,7 @@ main(int argc, char **argv)
                if (i != 0)
                        PQsetNoticeProcessor(conns[i].conn,
                                                                 isotesterNoticeProcessor,
-                                                                (void *) &conns[i]);
+                                                                &conns[i]);
                else
                        PQsetNoticeProcessor(conns[i].conn,
                                                                 blackholeNoticeProcessor,
index cd503a2cd8111fa4522fe4405e6b8750cecd5805..a780c678fbc8b7ef4a9cf1c30fba781d8b1bd703 100644 (file)
@@ -113,7 +113,7 @@ test_regex(PG_FUNCTION_ARGS)
                                                                                  (matchctx->npatterns + 1));
 
                MemoryContextSwitchTo(oldcontext);
-               funcctx->user_fctx = (void *) matchctx;
+               funcctx->user_fctx = matchctx;
 
                /*
                 * Return the first result row, which is info equivalent to Tcl's