mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 23:56:58 +03:00
Remove useless casts to (const void *)
Similar to commit 7f798aca1d5, but I didn't think to look for "const" as well.
This commit is contained in:
parent
1319997df9
commit
8743ea1b2e
@ -4292,7 +4292,7 @@ DropRelationsAllBuffers(SMgrRelation *smgr_reln, int nlocators)
|
||||
RelFileLocator locator;
|
||||
|
||||
locator = BufTagGetRelFileLocator(&bufHdr->tag);
|
||||
rlocator = bsearch((const void *) &(locator),
|
||||
rlocator = bsearch(&locator,
|
||||
locators, n, sizeof(RelFileLocator),
|
||||
rlocator_comparator);
|
||||
}
|
||||
@ -4646,7 +4646,7 @@ FlushRelationsAllBuffers(SMgrRelation *smgrs, int nrels)
|
||||
RelFileLocator rlocator;
|
||||
|
||||
rlocator = BufTagGetRelFileLocator(&bufHdr->tag);
|
||||
srelent = bsearch((const void *) &(rlocator),
|
||||
srelent = bsearch(&rlocator,
|
||||
srels, nrels, sizeof(SMgrSortArray),
|
||||
rlocator_comparator);
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ GetLockTagsMethodTable(const LOCKTAG *locktag)
|
||||
uint32
|
||||
LockTagHashCode(const LOCKTAG *locktag)
|
||||
{
|
||||
return get_hash_value(LockMethodLockHash, (const void *) locktag);
|
||||
return get_hash_value(LockMethodLockHash, locktag);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1822,7 +1822,7 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
|
||||
size_t avail = AH->lo_buf_size - AH->lo_buf_used;
|
||||
|
||||
memcpy((char *) AH->lo_buf + AH->lo_buf_used, ptr, avail);
|
||||
ptr = (const void *) ((const char *) ptr + avail);
|
||||
ptr = (const char *) ptr + avail;
|
||||
remaining -= avail;
|
||||
AH->lo_buf_used += avail;
|
||||
dump_lo_buf(AH);
|
||||
|
@ -292,13 +292,13 @@ check_set_block_offsets(PG_FUNCTION_ARGS)
|
||||
qsort(items.lookup_tids, items.num_tids, sizeof(ItemPointerData), itemptr_cmp);
|
||||
for (int i = 0; i < items.num_tids; i++)
|
||||
{
|
||||
if (itemptr_cmp((const void *) &items.insert_tids[i], (const void *) &items.iter_tids[i]) != 0)
|
||||
if (itemptr_cmp(&items.insert_tids[i], &items.iter_tids[i]) != 0)
|
||||
elog(ERROR, "TID iter array doesn't match verification array, got (%u,%u) expected (%u,%u)",
|
||||
ItemPointerGetBlockNumber(&items.iter_tids[i]),
|
||||
ItemPointerGetOffsetNumber(&items.iter_tids[i]),
|
||||
ItemPointerGetBlockNumber(&items.insert_tids[i]),
|
||||
ItemPointerGetOffsetNumber(&items.insert_tids[i]));
|
||||
if (itemptr_cmp((const void *) &items.insert_tids[i], (const void *) &items.lookup_tids[i]) != 0)
|
||||
if (itemptr_cmp(&items.insert_tids[i], &items.lookup_tids[i]) != 0)
|
||||
elog(ERROR, "TID lookup array doesn't match verification array, got (%u,%u) expected (%u,%u)",
|
||||
ItemPointerGetBlockNumber(&items.lookup_tids[i]),
|
||||
ItemPointerGetOffsetNumber(&items.lookup_tids[i]),
|
||||
|
Loading…
x
Reference in New Issue
Block a user