aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/postgres_fdw/shippable.c12
-rw-r--r--src/backend/access/gist/gistbuild.c4
-rw-r--r--src/backend/access/gist/gistbuildbuffers.c2
-rw-r--r--src/backend/access/transam/xlogutils.c6
-rw-r--r--src/backend/catalog/storage.c4
-rw-r--r--src/backend/optimizer/util/predtest.c2
-rw-r--r--src/backend/parser/parse_oper.c6
-rw-r--r--src/backend/replication/logical/relation.c6
-rw-r--r--src/backend/replication/logical/reorderbuffer.c34
-rw-r--r--src/backend/replication/pgoutput/pgoutput.c2
-rw-r--r--src/backend/storage/buffer/buf_table.c6
-rw-r--r--src/backend/storage/buffer/bufmgr.c17
-rw-r--r--src/backend/storage/buffer/localbuf.c15
-rw-r--r--src/backend/storage/lmgr/lock.c50
-rw-r--r--src/backend/storage/smgr/smgr.c6
-rw-r--r--src/backend/storage/sync/sync.c4
-rw-r--r--src/backend/tsearch/ts_typanalyze.c4
-rw-r--r--src/backend/utils/adt/array_typanalyze.c4
-rw-r--r--src/backend/utils/adt/ri_triggers.c8
-rw-r--r--src/backend/utils/cache/attoptcache.c6
-rw-r--r--src/backend/utils/cache/relcache.c12
-rw-r--r--src/backend/utils/cache/relfilenumbermap.c6
-rw-r--r--src/backend/utils/cache/spccache.c6
-rw-r--r--src/backend/utils/cache/ts_cache.c14
-rw-r--r--src/backend/utils/cache/typcache.c8
-rw-r--r--src/backend/utils/time/combocid.c2
-rw-r--r--src/pl/plpgsql/src/pl_comp.c6
-rw-r--r--src/pl/plpgsql/src/pl_exec.c2
28 files changed, 108 insertions, 146 deletions
diff --git a/contrib/postgres_fdw/shippable.c b/contrib/postgres_fdw/shippable.c
index 1b47a30dbfd..eb33d2a9932 100644
--- a/contrib/postgres_fdw/shippable.c
+++ b/contrib/postgres_fdw/shippable.c
@@ -77,7 +77,7 @@ InvalidateShippableCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
while ((entry = (ShippableCacheEntry *) hash_seq_search(&status)) != NULL)
{
if (hash_search(ShippableCacheHash,
- (void *) &entry->key,
+ &entry->key,
HASH_REMOVE,
NULL) == NULL)
elog(ERROR, "hash table corrupted");
@@ -183,10 +183,7 @@ is_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo)
/* See if we already cached the result. */
entry = (ShippableCacheEntry *)
- hash_search(ShippableCacheHash,
- (void *) &key,
- HASH_FIND,
- NULL);
+ hash_search(ShippableCacheHash, &key, HASH_FIND, NULL);
if (!entry)
{
@@ -199,10 +196,7 @@ is_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo)
* cache invalidation.
*/
entry = (ShippableCacheEntry *)
- hash_search(ShippableCacheHash,
- (void *) &key,
- HASH_ENTER,
- NULL);
+ hash_search(ShippableCacheHash, &key, HASH_ENTER, NULL);
entry->shippable = shippable;
}
diff --git a/src/backend/access/gist/gistbuild.c b/src/backend/access/gist/gistbuild.c
index d21a308d41d..7a6d93bb879 100644
--- a/src/backend/access/gist/gistbuild.c
+++ b/src/backend/access/gist/gistbuild.c
@@ -1587,7 +1587,7 @@ gistMemorizeParent(GISTBuildState *buildstate, BlockNumber child, BlockNumber pa
bool found;
entry = (ParentMapEntry *) hash_search(buildstate->parentMap,
- (const void *) &child,
+ &child,
HASH_ENTER,
&found);
entry->parentblkno = parent;
@@ -1625,7 +1625,7 @@ gistGetParent(GISTBuildState *buildstate, BlockNumber child)
/* Find node buffer in hash table */
entry = (ParentMapEntry *) hash_search(buildstate->parentMap,
- (const void *) &child,
+ &child,
HASH_FIND,
&found);
if (!found)
diff --git a/src/backend/access/gist/gistbuildbuffers.c b/src/backend/access/gist/gistbuildbuffers.c
index 3399a6ae685..95cbed43371 100644
--- a/src/backend/access/gist/gistbuildbuffers.c
+++ b/src/backend/access/gist/gistbuildbuffers.c
@@ -122,7 +122,7 @@ gistGetNodeBuffer(GISTBuildBuffers *gfbb, GISTSTATE *giststate,
/* Find node buffer in hash table */
nodeBuffer = (GISTNodeBuffer *) hash_search(gfbb->nodeBuffersTab,
- (const void *) &nodeBlocknum,
+ &nodeBlocknum,
HASH_ENTER,
&found);
if (!found)
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index 87ca9dfef16..2c28956b1aa 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -151,7 +151,7 @@ log_invalid_page(RelFileLocator locator, ForkNumber forkno, BlockNumber blkno,
key.forkno = forkno;
key.blkno = blkno;
hentry = (xl_invalid_page *)
- hash_search(invalid_page_tab, (void *) &key, HASH_ENTER, &found);
+ hash_search(invalid_page_tab, &key, HASH_ENTER, &found);
if (!found)
{
@@ -193,7 +193,7 @@ forget_invalid_pages(RelFileLocator locator, ForkNumber forkno,
}
if (hash_search(invalid_page_tab,
- (void *) &hentry->key,
+ &hentry->key,
HASH_REMOVE, NULL) == NULL)
elog(ERROR, "hash table corrupted");
}
@@ -226,7 +226,7 @@ forget_invalid_pages_db(Oid dbid)
}
if (hash_search(invalid_page_tab,
- (void *) &hentry->key,
+ &hentry->key,
HASH_REMOVE, NULL) == NULL)
elog(ERROR, "hash table corrupted");
}
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 039ada94c4f..af1491aa1d1 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -603,7 +603,7 @@ SerializePendingSyncs(Size maxSize, char *startAddress)
/* remove deleted rnodes */
for (delete = pendingDeletes; delete != NULL; delete = delete->next)
if (delete->atCommit)
- (void) hash_search(tmphash, (void *) &delete->rlocator,
+ (void) hash_search(tmphash, &delete->rlocator,
HASH_REMOVE, NULL);
hash_seq_init(&scan, tmphash);
@@ -748,7 +748,7 @@ smgrDoPendingSyncs(bool isCommit, bool isParallelWorker)
/* Skip syncing nodes that smgrDoPendingDeletes() will delete. */
for (pending = pendingDeletes; pending != NULL; pending = pending->next)
if (pending->atCommit)
- (void) hash_search(pendingSyncHash, (void *) &pending->rlocator,
+ (void) hash_search(pendingSyncHash, &pending->rlocator,
HASH_REMOVE, NULL);
hash_seq_init(&scan, pendingSyncHash);
diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c
index f6e12856ddb..237c8838743 100644
--- a/src/backend/optimizer/util/predtest.c
+++ b/src/backend/optimizer/util/predtest.c
@@ -2040,7 +2040,7 @@ lookup_proof_cache(Oid pred_op, Oid clause_op, bool refute_it)
key.pred_op = pred_op;
key.clause_op = clause_op;
cache_entry = (OprProofCacheEntry *) hash_search(OprProofCacheHash,
- (void *) &key,
+ &key,
HASH_ENTER, &cfound);
if (!cfound)
{
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c
index 8801f308984..bdc8f8e26af 100644
--- a/src/backend/parser/parse_oper.c
+++ b/src/backend/parser/parse_oper.c
@@ -1017,7 +1017,7 @@ find_oper_cache_entry(OprCacheKey *key)
/* Look for an existing entry */
oprentry = (OprCacheEntry *) hash_search(OprCacheHash,
- (void *) key,
+ key,
HASH_FIND, NULL);
if (oprentry == NULL)
return InvalidOid;
@@ -1038,7 +1038,7 @@ make_oper_cache_entry(OprCacheKey *key, Oid opr_oid)
Assert(OprCacheHash != NULL);
oprentry = (OprCacheEntry *) hash_search(OprCacheHash,
- (void *) key,
+ key,
HASH_ENTER, NULL);
oprentry->opr_oid = opr_oid;
}
@@ -1060,7 +1060,7 @@ InvalidateOprCacheCallBack(Datum arg, int cacheid, uint32 hashvalue)
while ((hentry = (OprCacheEntry *) hash_seq_search(&status)) != NULL)
{
if (hash_search(OprCacheHash,
- (void *) &hentry->key,
+ &hentry->key,
HASH_REMOVE, NULL) == NULL)
elog(ERROR, "hash table corrupted");
}
diff --git a/src/backend/replication/logical/relation.c b/src/backend/replication/logical/relation.c
index ca88ae171cb..9f139c64dba 100644
--- a/src/backend/replication/logical/relation.c
+++ b/src/backend/replication/logical/relation.c
@@ -167,7 +167,7 @@ logicalrep_relmap_update(LogicalRepRelation *remoterel)
/*
* HASH_ENTER returns the existing entry if present or creates a new one.
*/
- entry = hash_search(LogicalRepRelMap, (void *) &remoterel->remoteid,
+ entry = hash_search(LogicalRepRelMap, &remoterel->remoteid,
HASH_ENTER, &found);
if (found)
@@ -326,7 +326,7 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
logicalrep_relmap_init();
/* Search for existing entry. */
- entry = hash_search(LogicalRepRelMap, (void *) &remoteid,
+ entry = hash_search(LogicalRepRelMap, &remoteid,
HASH_FIND, &found);
if (!found)
@@ -598,7 +598,7 @@ logicalrep_partition_open(LogicalRepRelMapEntry *root,
/* Search for existing entry. */
part_entry = (LogicalRepPartMapEntry *) hash_search(LogicalRepPartMap,
- (void *) &partOid,
+ &partOid,
HASH_ENTER, &found);
entry = &part_entry->relmapentry;
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index efe057b4de2..0468d12936f 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -657,7 +657,7 @@ ReorderBufferTXNByXid(ReorderBuffer *rb, TransactionId xid, bool create,
/* search the lookup table */
ent = (ReorderBufferTXNByIdEnt *)
hash_search(rb->by_txn,
- (void *) &xid,
+ &xid,
create ? HASH_ENTER : HASH_FIND,
&found);
if (found)
@@ -1581,10 +1581,7 @@ ReorderBufferCleanupTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
dclist_delete_from(&rb->catchange_txns, &txn->catchange_node);
/* now remove reference from buffer */
- hash_search(rb->by_txn,
- (void *) &txn->xid,
- HASH_REMOVE,
- &found);
+ hash_search(rb->by_txn, &txn->xid, HASH_REMOVE, &found);
Assert(found);
/* remove entries spilled to disk */
@@ -1762,10 +1759,7 @@ ReorderBufferBuildTupleCidHash(ReorderBuffer *rb, ReorderBufferTXN *txn)
&key.tid);
ent = (ReorderBufferTupleCidEnt *)
- hash_search(txn->tuplecid_hash,
- (void *) &key,
- HASH_ENTER,
- &found);
+ hash_search(txn->tuplecid_hash, &key, HASH_ENTER, &found);
if (!found)
{
ent->cmin = change->data.tuplecid.cmin;
@@ -4653,10 +4647,7 @@ ReorderBufferToastAppendChunk(ReorderBuffer *rb, ReorderBufferTXN *txn,
Assert(!isnull);
ent = (ReorderBufferToastEnt *)
- hash_search(txn->toast_hash,
- (void *) &chunk_id,
- HASH_ENTER,
- &found);
+ hash_search(txn->toast_hash, &chunk_id, HASH_ENTER, &found);
if (!found)
{
@@ -4811,7 +4802,7 @@ ReorderBufferToastReplace(ReorderBuffer *rb, ReorderBufferTXN *txn,
*/
ent = (ReorderBufferToastEnt *)
hash_search(txn->toast_hash,
- (void *) &toast_pointer.va_valueid,
+ &toast_pointer.va_valueid,
HASH_FIND,
NULL);
if (ent == NULL)
@@ -5053,10 +5044,7 @@ ApplyLogicalMappingFile(HTAB *tuplecid_data, Oid relid, const char *fname)
ent = (ReorderBufferTupleCidEnt *)
- hash_search(tuplecid_data,
- (void *) &key,
- HASH_FIND,
- NULL);
+ hash_search(tuplecid_data, &key, HASH_FIND, NULL);
/* no existing mapping, no need to update */
if (!ent)
@@ -5067,10 +5055,7 @@ ApplyLogicalMappingFile(HTAB *tuplecid_data, Oid relid, const char *fname)
&key.tid);
new_ent = (ReorderBufferTupleCidEnt *)
- hash_search(tuplecid_data,
- (void *) &key,
- HASH_ENTER,
- &found);
+ hash_search(tuplecid_data, &key, HASH_ENTER, &found);
if (found)
{
@@ -5249,10 +5234,7 @@ ResolveCminCmaxDuringDecoding(HTAB *tuplecid_data,
restart:
ent = (ReorderBufferTupleCidEnt *)
- hash_search(tuplecid_data,
- (void *) &key,
- HASH_FIND,
- NULL);
+ hash_search(tuplecid_data, &key, HASH_FIND, NULL);
/*
* failed to find a mapping, check whether the table was rewritten and
diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/replication/pgoutput/pgoutput.c
index 1a80d67bb9c..e4938d8888f 100644
--- a/src/backend/replication/pgoutput/pgoutput.c
+++ b/src/backend/replication/pgoutput/pgoutput.c
@@ -2026,7 +2026,7 @@ get_rel_sync_entry(PGOutputData *data, Relation relation)
/* Find cached relation info, creating if not found */
entry = (RelationSyncEntry *) hash_search(RelationSyncCache,
- (void *) &relid,
+ &relid,
HASH_ENTER, &found);
Assert(entry != NULL);
diff --git a/src/backend/storage/buffer/buf_table.c b/src/backend/storage/buffer/buf_table.c
index e61546a5ff6..2b96639a5a5 100644
--- a/src/backend/storage/buffer/buf_table.c
+++ b/src/backend/storage/buffer/buf_table.c
@@ -94,7 +94,7 @@ BufTableLookup(BufferTag *tagPtr, uint32 hashcode)
result = (BufferLookupEnt *)
hash_search_with_hash_value(SharedBufHash,
- (void *) tagPtr,
+ tagPtr,
hashcode,
HASH_FIND,
NULL);
@@ -126,7 +126,7 @@ BufTableInsert(BufferTag *tagPtr, uint32 hashcode, int buf_id)
result = (BufferLookupEnt *)
hash_search_with_hash_value(SharedBufHash,
- (void *) tagPtr,
+ tagPtr,
hashcode,
HASH_ENTER,
&found);
@@ -152,7 +152,7 @@ BufTableDelete(BufferTag *tagPtr, uint32 hashcode)
result = (BufferLookupEnt *)
hash_search_with_hash_value(SharedBufHash,
- (void *) tagPtr,
+ tagPtr,
hashcode,
HASH_REMOVE,
NULL);
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 800a4248c95..1bc8d6555b9 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -262,7 +262,7 @@ ReservePrivateRefCountEntry(void)
/* enter victim array entry into hashtable */
hashent = hash_search(PrivateRefCountHash,
- (void *) &(ReservedRefCountEntry->buffer),
+ &(ReservedRefCountEntry->buffer),
HASH_ENTER,
&found);
Assert(!found);
@@ -336,10 +336,7 @@ GetPrivateRefCountEntry(Buffer buffer, bool do_move)
if (PrivateRefCountOverflowed == 0)
return NULL;
- res = hash_search(PrivateRefCountHash,
- (void *) &buffer,
- HASH_FIND,
- NULL);
+ res = hash_search(PrivateRefCountHash, &buffer, HASH_FIND, NULL);
if (res == NULL)
return NULL;
@@ -368,10 +365,7 @@ GetPrivateRefCountEntry(Buffer buffer, bool do_move)
free->refcount = res->refcount;
/* delete from hashtable */
- hash_search(PrivateRefCountHash,
- (void *) &buffer,
- HASH_REMOVE,
- &found);
+ hash_search(PrivateRefCountHash, &buffer, HASH_REMOVE, &found);
Assert(found);
Assert(PrivateRefCountOverflowed > 0);
PrivateRefCountOverflowed--;
@@ -430,10 +424,7 @@ ForgetPrivateRefCountEntry(PrivateRefCountEntry *ref)
bool found;
Buffer buffer = ref->buffer;
- hash_search(PrivateRefCountHash,
- (void *) &buffer,
- HASH_REMOVE,
- &found);
+ hash_search(PrivateRefCountHash, &buffer, HASH_REMOVE, &found);
Assert(found);
Assert(PrivateRefCountOverflowed > 0);
PrivateRefCountOverflowed--;
diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c
index 8372acc383d..71e2a5fecd5 100644
--- a/src/backend/storage/buffer/localbuf.c
+++ b/src/backend/storage/buffer/localbuf.c
@@ -76,7 +76,7 @@ PrefetchLocalBuffer(SMgrRelation smgr, ForkNumber forkNum,
/* See if the desired buffer already exists */
hresult = (LocalBufferLookupEnt *)
- hash_search(LocalBufHash, (void *) &newTag, HASH_FIND, NULL);
+ hash_search(LocalBufHash, &newTag, HASH_FIND, NULL);
if (hresult)
{
@@ -125,7 +125,7 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum,
/* See if the desired buffer already exists */
hresult = (LocalBufferLookupEnt *)
- hash_search(LocalBufHash, (void *) &newTag, HASH_FIND, NULL);
+ hash_search(LocalBufHash, &newTag, HASH_FIND, NULL);
if (hresult)
{
@@ -248,8 +248,7 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum,
if (buf_state & BM_TAG_VALID)
{
hresult = (LocalBufferLookupEnt *)
- hash_search(LocalBufHash, (void *) &bufHdr->tag,
- HASH_REMOVE, NULL);
+ hash_search(LocalBufHash, &bufHdr->tag, HASH_REMOVE, NULL);
if (!hresult) /* shouldn't happen */
elog(ERROR, "local buffer hash table corrupted");
/* mark buffer invalid just in case hash insert fails */
@@ -259,7 +258,7 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum,
}
hresult = (LocalBufferLookupEnt *)
- hash_search(LocalBufHash, (void *) &newTag, HASH_ENTER, &found);
+ hash_search(LocalBufHash, &newTag, HASH_ENTER, &found);
if (found) /* shouldn't happen */
elog(ERROR, "local buffer hash table corrupted");
hresult->id = b;
@@ -351,8 +350,7 @@ DropRelationLocalBuffers(RelFileLocator rlocator, ForkNumber forkNum,
/* Remove entry from hashtable */
hresult = (LocalBufferLookupEnt *)
- hash_search(LocalBufHash, (void *) &bufHdr->tag,
- HASH_REMOVE, NULL);
+ hash_search(LocalBufHash, &bufHdr->tag, HASH_REMOVE, NULL);
if (!hresult) /* shouldn't happen */
elog(ERROR, "local buffer hash table corrupted");
/* Mark buffer invalid */
@@ -396,8 +394,7 @@ DropRelationAllLocalBuffers(RelFileLocator rlocator)
LocalRefCount[i]);
/* Remove entry from hashtable */
hresult = (LocalBufferLookupEnt *)
- hash_search(LocalBufHash, (void *) &bufHdr->tag,
- HASH_REMOVE, NULL);
+ hash_search(LocalBufHash, &bufHdr->tag, HASH_REMOVE, NULL);
if (!hresult) /* shouldn't happen */
elog(ERROR, "local buffer hash table corrupted");
/* Mark buffer invalid */
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 49d62a0dc7e..a87372f33f9 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -608,7 +608,7 @@ LockHeldByMe(const LOCKTAG *locktag, LOCKMODE lockmode)
localtag.mode = lockmode;
locallock = (LOCALLOCK *) hash_search(LockMethodLocalHash,
- (void *) &localtag,
+ &localtag,
HASH_FIND, NULL);
return (locallock && locallock->nLocks > 0);
@@ -663,7 +663,7 @@ LockHasWaiters(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock)
localtag.mode = lockmode;
locallock = (LOCALLOCK *) hash_search(LockMethodLocalHash,
- (void *) &localtag,
+ &localtag,
HASH_FIND, NULL);
/*
@@ -825,7 +825,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
localtag.mode = lockmode;
locallock = (LOCALLOCK *) hash_search(LockMethodLocalHash,
- (void *) &localtag,
+ &localtag,
HASH_ENTER, &found);
/*
@@ -1061,7 +1061,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
dlist_delete(&proclock->lockLink);
dlist_delete(&proclock->procLink);
if (!hash_search_with_hash_value(LockMethodProcLockHash,
- (void *) &(proclock->tag),
+ &(proclock->tag),
proclock_hashcode,
HASH_REMOVE,
NULL))
@@ -1180,7 +1180,7 @@ SetupLockInTable(LockMethod lockMethodTable, PGPROC *proc,
* Find or create a lock with this tag.
*/
lock = (LOCK *) hash_search_with_hash_value(LockMethodLockHash,
- (const void *) locktag,
+ locktag,
hashcode,
HASH_ENTER_NULL,
&found);
@@ -1222,7 +1222,7 @@ SetupLockInTable(LockMethod lockMethodTable, PGPROC *proc,
* Find or create a proclock entry with this tag
*/
proclock = (PROCLOCK *) hash_search_with_hash_value(LockMethodProcLockHash,
- (void *) &proclocktag,
+ &proclocktag,
proclock_hashcode,
HASH_ENTER_NULL,
&found);
@@ -1239,7 +1239,7 @@ SetupLockInTable(LockMethod lockMethodTable, PGPROC *proc,
*/
Assert(dlist_is_empty(&(lock->procLocks)));
if (!hash_search_with_hash_value(LockMethodLockHash,
- (void *) &(lock->tag),
+ &(lock->tag),
hashcode,
HASH_REMOVE,
NULL))
@@ -1391,7 +1391,7 @@ RemoveLocalLock(LOCALLOCK *locallock)
}
if (!hash_search(LockMethodLocalHash,
- (void *) &(locallock->tag),
+ &(locallock->tag),
HASH_REMOVE, NULL))
elog(WARNING, "locallock table corrupted");
@@ -1644,7 +1644,7 @@ CleanUpLock(LOCK *lock, PROCLOCK *proclock,
dlist_delete(&proclock->procLink);
proclock_hashcode = ProcLockHashCode(&proclock->tag, hashcode);
if (!hash_search_with_hash_value(LockMethodProcLockHash,
- (void *) &(proclock->tag),
+ &(proclock->tag),
proclock_hashcode,
HASH_REMOVE,
NULL))
@@ -1660,7 +1660,7 @@ CleanUpLock(LOCK *lock, PROCLOCK *proclock,
LOCK_PRINT("CleanUpLock: deleting", lock, 0);
Assert(dlist_is_empty(&lock->procLocks));
if (!hash_search_with_hash_value(LockMethodLockHash,
- (void *) &(lock->tag),
+ &(lock->tag),
hashcode,
HASH_REMOVE,
NULL))
@@ -1998,7 +1998,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock)
localtag.mode = lockmode;
locallock = (LOCALLOCK *) hash_search(LockMethodLocalHash,
- (void *) &localtag,
+ &localtag,
HASH_FIND, NULL);
/*
@@ -2112,7 +2112,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock)
Assert(EligibleForRelationFastPath(locktag, lockmode));
lock = (LOCK *) hash_search_with_hash_value(LockMethodLockHash,
- (const void *) locktag,
+ locktag,
locallock->hashcode,
HASH_FIND,
NULL);
@@ -2123,7 +2123,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock)
proclocktag.myLock = lock;
proclocktag.myProc = MyProc;
locallock->proclock = (PROCLOCK *) hash_search(LockMethodProcLockHash,
- (void *) &proclocktag,
+ &proclocktag,
HASH_FIND,
NULL);
if (!locallock->proclock)
@@ -2851,7 +2851,7 @@ FastPathGetRelationLockEntry(LOCALLOCK *locallock)
LWLockAcquire(partitionLock, LW_SHARED);
lock = (LOCK *) hash_search_with_hash_value(LockMethodLockHash,
- (void *) locktag,
+ locktag,
locallock->hashcode,
HASH_FIND,
NULL);
@@ -2864,7 +2864,7 @@ FastPathGetRelationLockEntry(LOCALLOCK *locallock)
proclock_hashcode = ProcLockHashCode(&proclocktag, locallock->hashcode);
proclock = (PROCLOCK *)
hash_search_with_hash_value(LockMethodProcLockHash,
- (void *) &proclocktag,
+ &proclocktag,
proclock_hashcode,
HASH_FIND,
NULL);
@@ -3028,7 +3028,7 @@ GetLockConflicts(const LOCKTAG *locktag, LOCKMODE lockmode, int *countp)
LWLockAcquire(partitionLock, LW_SHARED);
lock = (LOCK *) hash_search_with_hash_value(LockMethodLockHash,
- (const void *) locktag,
+ locktag,
hashcode,
HASH_FIND,
NULL);
@@ -3125,7 +3125,7 @@ LockRefindAndRelease(LockMethod lockMethodTable, PGPROC *proc,
* Re-find the lock object (it had better be there).
*/
lock = (LOCK *) hash_search_with_hash_value(LockMethodLockHash,
- (void *) locktag,
+ locktag,
hashcode,
HASH_FIND,
NULL);
@@ -3141,7 +3141,7 @@ LockRefindAndRelease(LockMethod lockMethodTable, PGPROC *proc,
proclock_hashcode = ProcLockHashCode(&proclocktag, hashcode);
proclock = (PROCLOCK *) hash_search_with_hash_value(LockMethodProcLockHash,
- (void *) &proclocktag,
+ &proclocktag,
proclock_hashcode,
HASH_FIND,
NULL);
@@ -3255,7 +3255,7 @@ CheckForSessionAndXactLocks(void)
/* Otherwise, find or make an entry in lockhtab */
hentry = (PerLockTagEntry *) hash_search(lockhtab,
- (void *) &locallock->tag.lock,
+ &locallock->tag.lock,
HASH_ENTER, &found);
if (!found) /* initialize, if newly created */
hentry->sessLock = hentry->xactLock = false;
@@ -3555,8 +3555,8 @@ PostPrepare_Locks(TransactionId xid)
* given lock with my own proc.
*/
if (!hash_update_hash_key(LockMethodProcLockHash,
- (void *) proclock,
- (void *) &proclocktag))
+ proclock,
+ &proclocktag))
elog(PANIC, "duplicate entry found while reassigning a prepared transaction's locks");
/* Re-link into the new proc's proclock list */
@@ -4202,7 +4202,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
* Find or create a lock with this tag.
*/
lock = (LOCK *) hash_search_with_hash_value(LockMethodLockHash,
- (void *) locktag,
+ locktag,
hashcode,
HASH_ENTER_NULL,
&found);
@@ -4250,7 +4250,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
* Find or create a proclock entry with this tag
*/
proclock = (PROCLOCK *) hash_search_with_hash_value(LockMethodProcLockHash,
- (void *) &proclocktag,
+ &proclocktag,
proclock_hashcode,
HASH_ENTER_NULL,
&found);
@@ -4267,7 +4267,7 @@ lock_twophase_recover(TransactionId xid, uint16 info,
*/
Assert(dlist_is_empty(&lock->procLocks));
if (!hash_search_with_hash_value(LockMethodLockHash,
- (void *) &(lock->tag),
+ &(lock->tag),
hashcode,
HASH_REMOVE,
NULL))
@@ -4679,7 +4679,7 @@ LockWaiterCount(const LOCKTAG *locktag)
LWLockAcquire(partitionLock, LW_EXCLUSIVE);
lock = (LOCK *) hash_search_with_hash_value(LockMethodLockHash,
- (const void *) locktag,
+ locktag,
hashcode,
HASH_FIND,
&found);
diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c
index 80eb6311e74..b2bd749d770 100644
--- a/src/backend/storage/smgr/smgr.c
+++ b/src/backend/storage/smgr/smgr.c
@@ -165,7 +165,7 @@ smgropen(RelFileLocator rlocator, BackendId backend)
brlocator.locator = rlocator;
brlocator.backend = backend;
reln = (SMgrRelation) hash_search(SMgrRelationHash,
- (void *) &brlocator,
+ &brlocator,
HASH_ENTER, &found);
/* Initialize it if not present before */
@@ -267,7 +267,7 @@ smgrclose(SMgrRelation reln)
dlist_delete(&reln->node);
if (hash_search(SMgrRelationHash,
- (void *) &(reln->smgr_rlocator),
+ &(reln->smgr_rlocator),
HASH_REMOVE, NULL) == NULL)
elog(ERROR, "SMgrRelation hashtable corrupted");
@@ -352,7 +352,7 @@ smgrcloserellocator(RelFileLocatorBackend rlocator)
return;
reln = (SMgrRelation) hash_search(SMgrRelationHash,
- (void *) &rlocator,
+ &rlocator,
HASH_FIND, NULL);
if (reln != NULL)
smgrclose(reln);
diff --git a/src/backend/storage/sync/sync.c b/src/backend/storage/sync/sync.c
index 7135150b167..768d1dbfc41 100644
--- a/src/backend/storage/sync/sync.c
+++ b/src/backend/storage/sync/sync.c
@@ -501,7 +501,7 @@ RememberSyncRequest(const FileTag *ftag, SyncRequestType type)
/* Cancel previously entered request */
entry = (PendingFsyncEntry *) hash_search(pendingOps,
- (void *) ftag,
+ ftag,
HASH_FIND,
NULL);
if (entry != NULL)
@@ -557,7 +557,7 @@ RememberSyncRequest(const FileTag *ftag, SyncRequestType type)
Assert(type == SYNC_REQUEST);
entry = (PendingFsyncEntry *) hash_search(pendingOps,
- (void *) ftag,
+ ftag,
HASH_ENTER,
&found);
/* if new entry, or was previously canceled, initialize it */
diff --git a/src/backend/tsearch/ts_typanalyze.c b/src/backend/tsearch/ts_typanalyze.c
index ae4b5d10f29..75ecd72efe1 100644
--- a/src/backend/tsearch/ts_typanalyze.c
+++ b/src/backend/tsearch/ts_typanalyze.c
@@ -254,7 +254,7 @@ compute_tsvector_stats(VacAttrStats *stats,
/* Lookup current lexeme in hashtable, adding it if new */
item = (TrackItem *) hash_search(lexemes_tab,
- (const void *) &hash_key,
+ &hash_key,
HASH_ENTER, &found);
if (found)
@@ -464,7 +464,7 @@ prune_lexemes_hashtable(HTAB *lexemes_tab, int b_current)
{
char *lexeme = item->key.lexeme;
- if (hash_search(lexemes_tab, (const void *) &item->key,
+ if (hash_search(lexemes_tab, &item->key,
HASH_REMOVE, NULL) == NULL)
elog(ERROR, "hash table corrupted");
pfree(lexeme);
diff --git a/src/backend/utils/adt/array_typanalyze.c b/src/backend/utils/adt/array_typanalyze.c
index 5841d7d6fcb..52e160d6bbb 100644
--- a/src/backend/utils/adt/array_typanalyze.c
+++ b/src/backend/utils/adt/array_typanalyze.c
@@ -362,7 +362,7 @@ compute_array_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
/* Lookup current element in hashtable, adding it if new */
elem_value = elem_values[j];
item = (TrackItem *) hash_search(elements_tab,
- (const void *) &elem_value,
+ &elem_value,
HASH_ENTER, &found);
if (found)
@@ -690,7 +690,7 @@ prune_element_hashtable(HTAB *elements_tab, int b_current)
{
Datum value = item->key;
- if (hash_search(elements_tab, (const void *) &item->key,
+ if (hash_search(elements_tab, &item->key,
HASH_REMOVE, NULL) == NULL)
elog(ERROR, "hash table corrupted");
/* We should free memory if element is not passed by value */
diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c
index 995571ae044..375b17b9f3b 100644
--- a/src/backend/utils/adt/ri_triggers.c
+++ b/src/backend/utils/adt/ri_triggers.c
@@ -2129,7 +2129,7 @@ ri_LoadConstraintInfo(Oid constraintOid)
* Find or create a hash entry. If we find a valid one, just return it.
*/
riinfo = (RI_ConstraintInfo *) hash_search(ri_constraint_cache,
- (void *) &constraintOid,
+ &constraintOid,
HASH_ENTER, &found);
if (!found)
riinfo->valid = false;
@@ -2724,7 +2724,7 @@ ri_FetchPreparedPlan(RI_QueryKey *key)
* Lookup for the key
*/
entry = (RI_QueryHashEntry *) hash_search(ri_query_cache,
- (void *) key,
+ key,
HASH_FIND, NULL);
if (entry == NULL)
return NULL;
@@ -2777,7 +2777,7 @@ ri_HashPreparedPlan(RI_QueryKey *key, SPIPlanPtr plan)
* invalid by ri_FetchPreparedPlan.
*/
entry = (RI_QueryHashEntry *) hash_search(ri_query_cache,
- (void *) key,
+ key,
HASH_ENTER, &found);
Assert(!found || entry->plan == NULL);
entry->plan = plan;
@@ -2927,7 +2927,7 @@ ri_HashCompareOp(Oid eq_opr, Oid typeid)
key.eq_opr = eq_opr;
key.typeid = typeid;
entry = (RI_CompareHashEntry *) hash_search(ri_compare_cache,
- (void *) &key,
+ &key,
HASH_ENTER, &found);
if (!found)
entry->valid = false;
diff --git a/src/backend/utils/cache/attoptcache.c b/src/backend/utils/cache/attoptcache.c
index 28a99f0fc42..6769d4765b1 100644
--- a/src/backend/utils/cache/attoptcache.c
+++ b/src/backend/utils/cache/attoptcache.c
@@ -63,7 +63,7 @@ InvalidateAttoptCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
if (attopt->opts)
pfree(attopt->opts);
if (hash_search(AttoptCacheHash,
- (void *) &attopt->key,
+ &attopt->key,
HASH_REMOVE,
NULL) == NULL)
elog(ERROR, "hash table corrupted");
@@ -116,7 +116,7 @@ get_attribute_options(Oid attrelid, int attnum)
key.attnum = attnum;
attopt =
(AttoptCacheEntry *) hash_search(AttoptCacheHash,
- (void *) &key,
+ &key,
HASH_FIND,
NULL);
@@ -163,7 +163,7 @@ get_attribute_options(Oid attrelid, int attnum)
* pg_attribute, since the read could cause a cache flush.
*/
attopt = (AttoptCacheEntry *) hash_search(AttoptCacheHash,
- (void *) &key,
+ &key,
HASH_ENTER,
NULL);
attopt->opts = opts;
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index d171cfcf2fc..dfda0ab7d69 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -210,7 +210,7 @@ static int EOXactTupleDescArrayLen = 0;
do { \
RelIdCacheEnt *hentry; bool found; \
hentry = (RelIdCacheEnt *) hash_search(RelationIdCache, \
- (void *) &((RELATION)->rd_id), \
+ &((RELATION)->rd_id), \
HASH_ENTER, &found); \
if (found) \
{ \
@@ -232,7 +232,7 @@ do { \
do { \
RelIdCacheEnt *hentry; \
hentry = (RelIdCacheEnt *) hash_search(RelationIdCache, \
- (void *) &(ID), \
+ &(ID), \
HASH_FIND, NULL); \
if (hentry) \
RELATION = hentry->reldesc; \
@@ -244,7 +244,7 @@ do { \
do { \
RelIdCacheEnt *hentry; \
hentry = (RelIdCacheEnt *) hash_search(RelationIdCache, \
- (void *) &((RELATION)->rd_id), \
+ &((RELATION)->rd_id), \
HASH_REMOVE, NULL); \
if (hentry == NULL) \
elog(WARNING, "failed to delete relcache entry for OID %u", \
@@ -1663,7 +1663,7 @@ LookupOpclassInfo(Oid operatorClassOid,
}
opcentry = (OpClassCacheEnt *) hash_search(OpClassCache,
- (void *) &operatorClassOid,
+ &operatorClassOid,
HASH_ENTER, &found);
if (!found)
@@ -3210,7 +3210,7 @@ AtEOXact_RelationCache(bool isCommit)
for (i = 0; i < eoxact_list_len; i++)
{
idhentry = (RelIdCacheEnt *) hash_search(RelationIdCache,
- (void *) &eoxact_list[i],
+ &eoxact_list[i],
HASH_FIND,
NULL);
if (idhentry != NULL)
@@ -3359,7 +3359,7 @@ AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid,
for (i = 0; i < eoxact_list_len; i++)
{
idhentry = (RelIdCacheEnt *) hash_search(RelationIdCache,
- (void *) &eoxact_list[i],
+ &eoxact_list[i],
HASH_FIND,
NULL);
if (idhentry != NULL)
diff --git a/src/backend/utils/cache/relfilenumbermap.c b/src/backend/utils/cache/relfilenumbermap.c
index 57c32547959..220f33d43f5 100644
--- a/src/backend/utils/cache/relfilenumbermap.c
+++ b/src/backend/utils/cache/relfilenumbermap.c
@@ -72,7 +72,7 @@ RelfilenumberMapInvalidateCallback(Datum arg, Oid relid)
entry->relid == relid) /* individual flushed relation */
{
if (hash_search(RelfilenumberMapHash,
- (void *) &entry->key,
+ &entry->key,
HASH_REMOVE,
NULL) == NULL)
elog(ERROR, "hash table corrupted");
@@ -164,7 +164,7 @@ RelidByRelfilenumber(Oid reltablespace, RelFileNumber relfilenumber)
* since querying invalid values isn't supposed to be a frequent thing,
* but it's basically free.
*/
- entry = hash_search(RelfilenumberMapHash, (void *) &key, HASH_FIND, &found);
+ entry = hash_search(RelfilenumberMapHash, &key, HASH_FIND, &found);
if (found)
return entry->relid;
@@ -235,7 +235,7 @@ RelidByRelfilenumber(Oid reltablespace, RelFileNumber relfilenumber)
* caused cache invalidations to be executed which would have deleted a
* new entry if we had entered it above.
*/
- entry = hash_search(RelfilenumberMapHash, (void *) &key, HASH_ENTER, &found);
+ entry = hash_search(RelfilenumberMapHash, &key, HASH_ENTER, &found);
if (found)
elog(ERROR, "corrupted hashtable");
entry->relid = relid;
diff --git a/src/backend/utils/cache/spccache.c b/src/backend/utils/cache/spccache.c
index aabe6ba64b1..136fd737d37 100644
--- a/src/backend/utils/cache/spccache.c
+++ b/src/backend/utils/cache/spccache.c
@@ -63,7 +63,7 @@ InvalidateTableSpaceCacheCallback(Datum arg, int cacheid, uint32 hashvalue)
if (spc->opts)
pfree(spc->opts);
if (hash_search(TableSpaceCacheHash,
- (void *) &spc->oid,
+ &spc->oid,
HASH_REMOVE,
NULL) == NULL)
elog(ERROR, "hash table corrupted");
@@ -121,7 +121,7 @@ get_tablespace(Oid spcid)
if (!TableSpaceCacheHash)
InitializeTableSpaceCache();
spc = (TableSpaceCacheEntry *) hash_search(TableSpaceCacheHash,
- (void *) &spcid,
+ &spcid,
HASH_FIND,
NULL);
if (spc)
@@ -163,7 +163,7 @@ get_tablespace(Oid spcid)
* flush.
*/
spc = (TableSpaceCacheEntry *) hash_search(TableSpaceCacheHash,
- (void *) &spcid,
+ &spcid,
HASH_ENTER,
NULL);
spc->opts = opts;
diff --git a/src/backend/utils/cache/ts_cache.c b/src/backend/utils/cache/ts_cache.c
index 519fa9fa731..7760ad764ea 100644
--- a/src/backend/utils/cache/ts_cache.c
+++ b/src/backend/utils/cache/ts_cache.c
@@ -139,7 +139,7 @@ lookup_ts_parser_cache(Oid prsId)
/* Try to look up an existing entry */
entry = (TSParserCacheEntry *) hash_search(TSParserCacheHash,
- (void *) &prsId,
+ &prsId,
HASH_FIND, NULL);
if (entry == NULL || !entry->isvalid)
{
@@ -172,9 +172,7 @@ lookup_ts_parser_cache(Oid prsId)
/* Now make the cache entry */
entry = (TSParserCacheEntry *)
- hash_search(TSParserCacheHash,
- (void *) &prsId,
- HASH_ENTER, &found);
+ hash_search(TSParserCacheHash, &prsId, HASH_ENTER, &found);
Assert(!found); /* it wasn't there a moment ago */
}
@@ -238,7 +236,7 @@ lookup_ts_dictionary_cache(Oid dictId)
/* Try to look up an existing entry */
entry = (TSDictionaryCacheEntry *) hash_search(TSDictionaryCacheHash,
- (void *) &dictId,
+ &dictId,
HASH_FIND, NULL);
if (entry == NULL || !entry->isvalid)
{
@@ -288,7 +286,7 @@ lookup_ts_dictionary_cache(Oid dictId)
/* Now make the cache entry */
entry = (TSDictionaryCacheEntry *)
hash_search(TSDictionaryCacheHash,
- (void *) &dictId,
+ &dictId,
HASH_ENTER, &found);
Assert(!found); /* it wasn't there a moment ago */
@@ -401,7 +399,7 @@ lookup_ts_config_cache(Oid cfgId)
/* Try to look up an existing entry */
entry = (TSConfigCacheEntry *) hash_search(TSConfigCacheHash,
- (void *) &cfgId,
+ &cfgId,
HASH_FIND, NULL);
if (entry == NULL || !entry->isvalid)
{
@@ -441,7 +439,7 @@ lookup_ts_config_cache(Oid cfgId)
/* Now make the cache entry */
entry = (TSConfigCacheEntry *)
hash_search(TSConfigCacheHash,
- (void *) &cfgId,
+ &cfgId,
HASH_ENTER, &found);
Assert(!found); /* it wasn't there a moment ago */
}
diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c
index 4a3e0fdb7fe..ed6360ce2b9 100644
--- a/src/backend/utils/cache/typcache.c
+++ b/src/backend/utils/cache/typcache.c
@@ -364,7 +364,7 @@ lookup_type_cache(Oid type_id, int flags)
/* Try to look up an existing entry */
typentry = (TypeCacheEntry *) hash_search(TypeCacheHash,
- (void *) &type_id,
+ &type_id,
HASH_FIND, NULL);
if (typentry == NULL)
{
@@ -392,7 +392,7 @@ lookup_type_cache(Oid type_id, int flags)
/* Now make the typcache entry */
typentry = (TypeCacheEntry *) hash_search(TypeCacheHash,
- (void *) &type_id,
+ &type_id,
HASH_ENTER, &found);
Assert(!found); /* it wasn't there a moment ago */
@@ -1974,7 +1974,7 @@ assign_record_type_typmod(TupleDesc tupDesc)
* the allocations succeed before we create the new entry.
*/
recentry = (RecordCacheEntry *) hash_search(RecordCacheHash,
- (void *) &tupDesc,
+ &tupDesc,
HASH_FIND, &found);
if (found && recentry->tupdesc != NULL)
{
@@ -2012,7 +2012,7 @@ assign_record_type_typmod(TupleDesc tupDesc)
/* Fully initialized; create the hash table entry */
recentry = (RecordCacheEntry *) hash_search(RecordCacheHash,
- (void *) &tupDesc,
+ &tupDesc,
HASH_ENTER, NULL);
recentry->tupdesc = entDesc;
diff --git a/src/backend/utils/time/combocid.c b/src/backend/utils/time/combocid.c
index c7124d284fa..0e94bc93f74 100644
--- a/src/backend/utils/time/combocid.c
+++ b/src/backend/utils/time/combocid.c
@@ -253,7 +253,7 @@ GetComboCommandId(CommandId cmin, CommandId cmax)
key.cmin = cmin;
key.cmax = cmax;
entry = (ComboCidEntry) hash_search(comboHash,
- (void *) &key,
+ &key,
HASH_ENTER,
&found);
diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c
index 8ce41862400..7db912fd18b 100644
--- a/src/pl/plpgsql/src/pl_comp.c
+++ b/src/pl/plpgsql/src/pl_comp.c
@@ -2627,7 +2627,7 @@ plpgsql_HashTableLookup(PLpgSQL_func_hashkey *func_key)
plpgsql_HashEnt *hentry;
hentry = (plpgsql_HashEnt *) hash_search(plpgsql_HashTable,
- (void *) func_key,
+ func_key,
HASH_FIND,
NULL);
if (hentry)
@@ -2644,7 +2644,7 @@ plpgsql_HashTableInsert(PLpgSQL_function *function,
bool found;
hentry = (plpgsql_HashEnt *) hash_search(plpgsql_HashTable,
- (void *) func_key,
+ func_key,
HASH_ENTER,
&found);
if (found)
@@ -2665,7 +2665,7 @@ plpgsql_HashTableDelete(PLpgSQL_function *function)
return;
hentry = (plpgsql_HashEnt *) hash_search(plpgsql_HashTable,
- (void *) function->fn_hashkey,
+ function->fn_hashkey,
HASH_REMOVE,
NULL);
if (hentry == NULL)
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 37da6243881..70a002a0f6a 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -7775,7 +7775,7 @@ get_cast_hashentry(PLpgSQL_execstate *estate,
cast_key.srctypmod = srctypmod;
cast_key.dsttypmod = dsttypmod;
cast_entry = (plpgsql_CastHashEntry *) hash_search(estate->cast_hash,
- (void *) &cast_key,
+ &cast_key,
HASH_ENTER, &found);
if (!found) /* initialize if new entry */
cast_entry->cast_cexpr = NULL;