mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +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:
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user