mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
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
This commit is contained in:
@ -1304,7 +1304,7 @@ acquire_sample_rows(Relation onerel, int elevel,
|
||||
* tuples are already sorted.
|
||||
*/
|
||||
if (numrows == targrows)
|
||||
qsort_interruptible((void *) rows, numrows, sizeof(HeapTuple),
|
||||
qsort_interruptible(rows, numrows, sizeof(HeapTuple),
|
||||
compare_rows, NULL);
|
||||
|
||||
/*
|
||||
@ -2479,8 +2479,8 @@ compute_scalar_stats(VacAttrStatsP stats,
|
||||
/* Sort the collected values */
|
||||
cxt.ssup = &ssup;
|
||||
cxt.tupnoLink = tupnoLink;
|
||||
qsort_interruptible((void *) values, values_cnt, sizeof(ScalarItem),
|
||||
compare_scalars, (void *) &cxt);
|
||||
qsort_interruptible(values, values_cnt, sizeof(ScalarItem),
|
||||
compare_scalars, &cxt);
|
||||
|
||||
/*
|
||||
* Now scan the values in order, find the most common ones, and also
|
||||
@ -2724,7 +2724,7 @@ compute_scalar_stats(VacAttrStatsP stats,
|
||||
deltafrac;
|
||||
|
||||
/* Sort the MCV items into position order to speed next loop */
|
||||
qsort_interruptible((void *) track, num_mcv, sizeof(ScalarMCVItem),
|
||||
qsort_interruptible(track, num_mcv, sizeof(ScalarMCVItem),
|
||||
compare_mcvs, NULL);
|
||||
|
||||
/*
|
||||
|
@ -878,7 +878,7 @@ pg_import_system_collations(PG_FUNCTION_ARGS)
|
||||
* created such a pg_collation entry above, and that one will win.)
|
||||
*/
|
||||
if (naliases > 1)
|
||||
qsort((void *) aliases, naliases, sizeof(CollAliasData), cmpaliases);
|
||||
qsort(aliases, naliases, sizeof(CollAliasData), cmpaliases);
|
||||
|
||||
/* Now add aliases, ignoring any that match pre-existing entries */
|
||||
for (i = 0; i < naliases; i++)
|
||||
|
@ -2384,8 +2384,8 @@ vac_tid_reaped(ItemPointer itemptr, void *state)
|
||||
if (item < litem || item > ritem)
|
||||
return false;
|
||||
|
||||
res = (ItemPointer) bsearch((void *) itemptr,
|
||||
(void *) dead_items->items,
|
||||
res = (ItemPointer) bsearch(itemptr,
|
||||
dead_items->items,
|
||||
dead_items->num_items,
|
||||
sizeof(ItemPointerData),
|
||||
vac_cmp_itemptr);
|
||||
|
Reference in New Issue
Block a user