1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +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:
Peter Eisentraut
2024-11-28 08:19:22 +01:00
parent 97525bc5c8
commit 7f798aca1d
158 changed files with 491 additions and 550 deletions

View 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);
}
/*