mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user