From 7f798aca1d5df290aafad41180baea0ae311b4ee Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Thu, 28 Nov 2024 08:19:22 +0100 Subject: 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 --- src/backend/tcop/postgres.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index bd424767176..4b985bd0561 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -1816,7 +1816,7 @@ exec_bind_message(StringInfo input_message) one_param_data.paramval = NULL; params_errcxt.previous = error_context_stack; params_errcxt.callback = bind_param_error_callback; - params_errcxt.arg = (void *) &one_param_data; + params_errcxt.arg = &one_param_data; error_context_stack = ¶ms_errcxt; params = makeParamList(numParams); @@ -2006,7 +2006,7 @@ exec_bind_message(StringInfo input_message) params_data.params = params; params_errcxt.previous = error_context_stack; params_errcxt.callback = ParamsErrorCallback; - params_errcxt.arg = (void *) ¶ms_data; + params_errcxt.arg = ¶ms_data; error_context_stack = ¶ms_errcxt; /* Get the result format codes */ @@ -2251,7 +2251,7 @@ exec_execute_message(const char *portal_name, long max_rows) params_data.params = portalParams; params_errcxt.previous = error_context_stack; params_errcxt.callback = ParamsErrorCallback; - params_errcxt.arg = (void *) ¶ms_data; + params_errcxt.arg = ¶ms_data; error_context_stack = ¶ms_errcxt; if (max_rows <= 0) -- cgit v1.2.3