aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2024-11-28 08:19:22 +0100
committerPeter Eisentraut <peter@eisentraut.org>2024-11-28 08:27:20 +0100
commit7f798aca1d5df290aafad41180baea0ae311b4ee (patch)
treeb4c8132ec85c21f6c72308b5857defd70958de69 /contrib/postgres_fdw/postgres_fdw.c
parent97525bc5c8ffb31475d23955d08e9ec9c1408f33 (diff)
downloadpostgresql-7f798aca1d5df290aafad41180baea0ae311b4ee.tar.gz
postgresql-7f798aca1d5df290aafad41180baea0ae311b4ee.zip
Remove useless casts to (void *)
Many of them just seem to have been copied around for no real reason. Their presence causes (small) risks of hiding actual type mismatches or silently discarding qualifiers Discussion: https://www.postgresql.org/message-id/flat/461ea37c-8b58-43b4-9736-52884e862820@eisentraut.org
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
-rw-r--r--contrib/postgres_fdw/postgres_fdw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index 53733d642d0..c0810fbd7c8 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -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;