0005-Remove-useless-casts-to-void-memmove.patch

text/plain

Filename: 0005-Remove-useless-casts-to-void-memmove.patch
Type: text/plain
Part: 4
Message: Remove some useless casts to (void *)

Patch

Format: format-patch
Series: patch 0005
Subject: Remove useless casts to (void *) (memmove)
File+
contrib/intarray/_int_gist.c 2 2
From 7da5b5474a65d5a5a3fd104a624f3e9048f973dd Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Thu, 2 Feb 2023 23:02:35 +0100
Subject: [PATCH 5/8] Remove useless casts to (void *) (memmove)

---
 contrib/intarray/_int_gist.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c
index 331fa25fcf..2d72e7dafb 100644
--- a/contrib/intarray/_int_gist.c
+++ b/contrib/intarray/_int_gist.c
@@ -243,7 +243,7 @@ g_int_compress(PG_FUNCTION_ARGS)
 			/*
 			 * shunt everything down to start at the right place
 			 */
-			memmove((void *) &dr[0], (void *) &dr[2 * j], 2 * (len - j) * sizeof(int32));
+			memmove(&dr[0], &dr[2 * j], 2 * (len - j) * sizeof(int32));
 		}
 
 		/*
@@ -260,7 +260,7 @@ g_int_compress(PG_FUNCTION_ARGS)
 					min = ((int64) dr[i] - (int64) dr[i - 1]);
 					cand = i;
 				}
-			memmove((void *) &dr[cand - 1], (void *) &dr[cand + 1], (len - cand - 1) * sizeof(int32));
+			memmove(&dr[cand - 1], &dr[cand + 1], (len - cand - 1) * sizeof(int32));
 			len -= 2;
 		}
 
-- 
2.39.1