1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Remove more (void) and fix -Wall warnings.

This commit is contained in:
Bruce Momjian
1997-08-12 22:55:25 +00:00
parent 0f6a961e29
commit ea5b5357cd
79 changed files with 316 additions and 323 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.15 1997/07/28 00:54:43 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.16 1997/08/12 22:53:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -248,7 +248,7 @@ ReadBufferWithBufferLock(Relation reln,
if (extend) {
/* new buffers are zero-filled */
memset((char *) MAKE_PTR(bufHdr->data), 0, BLCKSZ);
(void) smgrextend(bufHdr->bufsmgr, reln,
smgrextend(bufHdr->bufsmgr, reln,
(char *) MAKE_PTR(bufHdr->data));
}
return (BufferDescriptorGetBuffer(bufHdr));
@@ -261,7 +261,7 @@ ReadBufferWithBufferLock(Relation reln,
*/
if (extend) {
/* new buffers are zero-filled */
(void) memset((char *) MAKE_PTR(bufHdr->data), 0, BLCKSZ);
memset((char *) MAKE_PTR(bufHdr->data), 0, BLCKSZ);
status = smgrextend(bufHdr->bufsmgr, reln,
(char *) MAKE_PTR(bufHdr->data));
} else {
@@ -1728,7 +1728,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
break;
}
(void) fclose(fp);
fclose(fp);
kill(getpid(), SIGILL);
}

View File

@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Id: fd.c,v 1.19 1997/07/28 00:54:52 momjian Exp $
* $Id: fd.c,v 1.20 1997/08/12 22:53:51 momjian Exp $
*
* NOTES:
*
@@ -765,8 +765,8 @@ FileTruncate(File file, int offset)
DO_DB(elog(DEBUG, "FileTruncate %d (%s)",
file, VfdCache[file].fileName));
(void) FileSync(file);
(void) FileAccess(file);
FileSync(file);
FileAccess(file);
returnCode = ftruncate(VfdCache[file].fd, offset);
return(returnCode);
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.15 1997/07/29 14:07:48 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.16 1997/08/12 22:53:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -100,13 +100,13 @@ S_LOCK(slock_t *lock)
void
S_UNLOCK(slock_t *lock)
{
(void)release_lock(lock);
release_lock(lock);
}
void
S_INIT_LOCK(slock_t *lock)
{
(void)init_lock(lock);
init_lock(lock);
}
/* S_LOCK_FREE should return 1 if lock is free; 0 if lock is locked */
@@ -138,13 +138,13 @@ S_LOCK(slock_t *lock)
void
S_UNLOCK(slock_t *lock)
{
(void) msem_unlock(lock, 0);
msem_unlock(lock, 0);
}
void
S_INIT_LOCK(slock_t *lock)
{
(void) msem_init(lock, MSEM_UNLOCKED);
msem_init(lock, MSEM_UNLOCKED);
}
int

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.9 1997/06/06 22:04:04 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.10 1997/08/12 22:53:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -544,7 +544,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
if (! structPtr) {
/* out of memory */
Assert (BindingTable);
(void) hash_search(BindingTable,(char *) &item,HASH_REMOVE, foundPtr);
hash_search(BindingTable,(char *) &item,HASH_REMOVE, foundPtr);
SpinRelease(BindingLock);
*foundPtr = FALSE;
@@ -578,7 +578,7 @@ TransactionIdIsInProgress (TransactionId xid)
SpinAcquire(BindingLock);
(void) hash_seq ((HTAB *)NULL);
hash_seq ((HTAB *)NULL);
while ( (result = (BindingEnt *) hash_seq (BindingTable)) != NULL )
{
if ( result == (BindingEnt *) TRUE )

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.6 1997/01/08 08:32:04 bryanh Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.7 1997/08/12 22:53:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -143,7 +143,7 @@ RegisterSharedInvalid(int cacheId, /* XXX */
}
/* write again */
(void) SISetDataEntry(shmInvalBuffer, &newInvalid);
SISetDataEntry(shmInvalBuffer, &newInvalid);
}
SpinRelease(SInvalLock);
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.4 1997/07/24 20:14:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.5 1997/08/12 22:54:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -667,8 +667,8 @@ SISegInit(SISeg *segP)
SISetStartFreeSpace(segP, 0);
SISetStartEntryChain(segP, InvalidOffset);
SISetEndEntryChain(segP, InvalidOffset);
(void) SISetNumEntries(segP, 0);
(void) SISetMaxNumEntries(segP, MAXNUMMESSAGES);
SISetNumEntries(segP, 0);
SISetMaxNumEntries(segP, MAXNUMMESSAGES);
for (i = 0; i < MaxBackendId; i++) {
segP->procState[i].limit = -1; /* no backend active !!*/
segP->procState[i].resetState = false;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.11 1997/07/28 00:55:08 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.12 1997/08/12 22:54:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -127,11 +127,11 @@ inv_create(int flags)
/* this is pretty painful... want a tuple descriptor */
tupdesc = CreateTemplateTupleDesc(2);
(void) TupleDescInitEntry(tupdesc, (AttrNumber) 1,
TupleDescInitEntry(tupdesc, (AttrNumber) 1,
"olastbye",
"int4",
0, false);
(void) TupleDescInitEntry(tupdesc, (AttrNumber) 2,
TupleDescInitEntry(tupdesc, (AttrNumber) 2,
"odata",
"bytea",
0, false);
@@ -140,7 +140,7 @@ inv_create(int flags)
* will be located on whatever storage manager the user requested.
*/
(void) heap_create(objname,
heap_create(objname,
objname,
(int) archchar, smgr,
tupdesc);
@@ -1147,7 +1147,7 @@ _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln)
*/
if (buf != InvalidBuffer)
(void) ReleaseBuffer(buf);
ReleaseBuffer(buf);
htup = heap_fetch(hreln, NowTimeQual, &(res->heap_iptr), &buf);

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.9 1997/03/15 01:23:58 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.10 1997/08/12 22:54:07 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -256,7 +256,7 @@ LockTabInit(char *tabName,
if (! ltable)
{
elog(NOTICE,"LockTabInit: couldn't malloc lock table %s\n",tabName);
(void) pfree (shmemName);
pfree (shmemName);
return(INVALID_TABLEID);
}
@@ -349,7 +349,7 @@ LockTabInit(char *tabName,
SpinRelease(LockMgrLock);
(void) pfree (shmemName);
pfree (shmemName);
if (status)
return(ltable->ctl->tableId);
@@ -1057,7 +1057,7 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
* himself.
* --------------------------
*/
(void) ProcLockWakeup(&(lock->waitProcs), (char *) ltable, (char *) lock);
ProcLockWakeup(&(lock->waitProcs), (char *) ltable, (char *) lock);
}
SpinRelease(masterLock);
@@ -1286,7 +1286,7 @@ LockReleaseAll(LockTableId tableId, SHM_QUEUE *lockQueue)
* --------------------
*/
waitQueue = &(lock->waitProcs);
(void) ProcLockWakeup(waitQueue, (char *) ltable, (char *) lock);
ProcLockWakeup(waitQueue, (char *) ltable, (char *) lock);
}
#ifdef USER_LOCKS

View File

@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.2 1996/11/03 05:07:31 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.3 1997/08/12 22:54:09 momjian Exp $
*
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
@@ -275,7 +275,7 @@ MultiAcquire(LockTableId tableId,
* the last level lock we successfully acquired
*/
retStatus = FALSE;
(void) MultiRelease(tableId, tag, lockt, i);
MultiRelease(tableId, tag, lockt, i);
/* now leave the loop. Don't try for any more locks */
break;
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.16 1997/08/12 20:15:48 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.17 1997/08/12 22:54:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -90,7 +90,7 @@ mdinit()
oldcxt = MemoryContextSwitchTo(MdCxt);
Md_fdvec = (MdfdVec *) palloc(Nfds * sizeof(MdfdVec));
(void) MemoryContextSwitchTo(oldcxt);
MemoryContextSwitchTo(oldcxt);
if (Md_fdvec == (MdfdVec *) NULL)
return (SM_FAIL);
@@ -193,7 +193,7 @@ mdunlink(Relation reln)
pfree(ov);
}
Md_fdvec[fd].mdfd_chain = (MdfdVec *) NULL;
(void) MemoryContextSwitchTo(oldcxt);
MemoryContextSwitchTo(oldcxt);
_fdvec_free (fd);
@@ -314,7 +314,7 @@ mdclose(Relation reln)
pfree(ov);
}
(void) MemoryContextSwitchTo(oldcxt);
MemoryContextSwitchTo(oldcxt);
Md_fdvec[fd].mdfd_chain = (MdfdVec *) NULL;
_fdvec_free (fd);
@@ -487,7 +487,7 @@ mdblindwrt(char *dbstr,
/* seek to the right spot */
seekpos = (long) (BLCKSZ * (blkno % RELSEG_SIZE));
if (lseek(fd, seekpos, SEEK_SET) != seekpos) {
(void) close(fd);
close(fd);
return (SM_FAIL);
}
@@ -668,7 +668,7 @@ int _fdvec_alloc ()
memmove(nvec, (char *) Md_fdvec, CurFd * sizeof(MdfdVec));
pfree(Md_fdvec);
(void) MemoryContextSwitchTo(oldcxt);
MemoryContextSwitchTo(oldcxt);
Md_fdvec = nvec;
@@ -735,7 +735,7 @@ _mdfd_openseg(Relation reln, int segno, int oflags)
/* allocate an mdfdvec entry for it */
oldcxt = MemoryContextSwitchTo(MdCxt);
v = (MdfdVec *) palloc(sizeof(MdfdVec));
(void) MemoryContextSwitchTo(oldcxt);
MemoryContextSwitchTo(oldcxt);
/* fill the entry */
v->mdfd_vfd = fd;