aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_utils_num.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-02-07 06:53:05 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-02-07 06:57:59 +0100
commitaa6954104644334c53838f181053b9f7aa13f58c (patch)
tree10af7e8602cfd6626b163a350960ff9d1875f43a /contrib/btree_gist/btree_utils_num.c
parentd9d7fe68d35e1e10c7c8276d07f5abf9c477cb13 (diff)
downloadpostgresql-aa6954104644334c53838f181053b9f7aa13f58c.tar.gz
postgresql-aa6954104644334c53838f181053b9f7aa13f58c.zip
Remove useless casts to (void *) in arguments of some system functions
The affected functions are: bsearch, memcmp, memcpy, memset, memmove, qsort, repalloc Reviewed-by: Corey Huinker <corey.huinker@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/fd9adf5d-b1aa-e82f-e4c7-263c30145807%40enterprisedb.com
Diffstat (limited to 'contrib/btree_gist/btree_utils_num.c')
-rw-r--r--contrib/btree_gist/btree_utils_num.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/btree_gist/btree_utils_num.c b/contrib/btree_gist/btree_utils_num.c
index 05c154afa34..346ee837d75 100644
--- a/contrib/btree_gist/btree_utils_num.c
+++ b/contrib/btree_gist/btree_utils_num.c
@@ -87,8 +87,8 @@ gbt_num_compress(GISTENTRY *entry, const gbtree_ninfo *tinfo)
Assert(tinfo->indexsize >= 2 * tinfo->size);
- memcpy((void *) &r[0], leaf, tinfo->size);
- memcpy((void *) &r[tinfo->size], leaf, tinfo->size);
+ memcpy(&r[0], leaf, tinfo->size);
+ memcpy(&r[tinfo->size], leaf, tinfo->size);
retval = palloc(sizeof(GISTENTRY));
gistentryinit(*retval, PointerGetDatum(r), entry->rel, entry->page,
entry->offset, false);
@@ -184,7 +184,7 @@ gbt_num_union(GBT_NUMKEY *out, const GistEntryVector *entryvec, const gbtree_nin
o.lower = &((GBT_NUMKEY *) out)[0];
o.upper = &((GBT_NUMKEY *) out)[tinfo->size];
- memcpy((void *) out, (void *) cur, 2 * tinfo->size);
+ memcpy(out, cur, 2 * tinfo->size);
for (i = 1; i < numranges; i++)
{
@@ -360,7 +360,7 @@ gbt_num_picksplit(const GistEntryVector *entryvec, GIST_SPLITVEC *v,
arr[i].t = (GBT_NUMKEY *) DatumGetPointer((entryvec->vector[i].key));
arr[i].i = i;
}
- qsort_arg((void *) &arr[FirstOffsetNumber], maxoff - FirstOffsetNumber + 1, sizeof(Nsrt), (qsort_arg_comparator) tinfo->f_cmp, (void *) flinfo);
+ qsort_arg(&arr[FirstOffsetNumber], maxoff - FirstOffsetNumber + 1, sizeof(Nsrt), (qsort_arg_comparator) tinfo->f_cmp, flinfo);
/* We do simply create two parts */