mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
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
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user