1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +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/access/nbtree/nbtsearch.c,v 1.21 1997/06/10 07:28:50 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.22 1997/08/12 22:51:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -915,7 +915,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
/* if this is true, the key we just looked at is gone */
if (result > 0)
(void) _bt_twostep(scan, &buf, ForwardScanDirection);
_bt_twostep(scan, &buf, ForwardScanDirection);
}
break;
@@ -931,7 +931,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
} while (result >= 0);
if (result < 0)
(void) _bt_twostep(scan, &buf, BackwardScanDirection);
_bt_twostep(scan, &buf, BackwardScanDirection);
}
break;
@@ -966,7 +966,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
* No key on this page, but offnum from _bt_binsrch() greater
* maxoff - have to move right. - vadim 12/06/96
*/
(void) _bt_twostep(scan, &buf, ForwardScanDirection);
_bt_twostep(scan, &buf, ForwardScanDirection);
}
}
else if (result < 0)
@@ -981,7 +981,7 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
} while (result < 0);
if (result > 0)
(void) _bt_twostep(scan, &buf, ForwardScanDirection);
_bt_twostep(scan, &buf, ForwardScanDirection);
}
break;

View File

@@ -5,7 +5,7 @@
*
*
* IDENTIFICATION
* $Id: nbtsort.c,v 1.17 1997/06/06 03:11:46 vadim Exp $
* $Id: nbtsort.c,v 1.18 1997/08/12 22:51:52 momjian Exp $
*
* NOTES
*
@@ -364,7 +364,7 @@ _bt_tapereset(BTTapeBlock *tape)
static void
_bt_taperewind(BTTapeBlock *tape)
{
(void) FileSeek(tape->bttb_fd, 0, SEEK_SET);
FileSeek(tape->bttb_fd, 0, SEEK_SET);
}
/*
@@ -511,7 +511,7 @@ _bt_tapenext(BTTapeBlock *tape, char **pos)
static void
_bt_tapeadd(BTTapeBlock *tape, BTItem item, int itemsz)
{
(void) memcpy(tape->bttb_data + tape->bttb_top, item, itemsz);
memcpy(tape->bttb_data + tape->bttb_top, item, itemsz);
++tape->bttb_ntup;
tape->bttb_top += DOUBLEALIGN(itemsz);
}
@@ -535,7 +535,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
if (btspool == (BTSpool *) NULL || fname == (char *) NULL) {
elog(WARN, "_bt_spoolinit: out of memory");
}
(void) memset((char *) btspool, 0, sizeof(BTSpool));
memset((char *) btspool, 0, sizeof(BTSpool));
btspool->bts_ntapes = ntapes;
btspool->bts_tape = 0;
btspool->isunique = isunique;
@@ -811,7 +811,7 @@ _bt_pagestate(Relation index, int flags, int level, bool doupper)
{
BTPageState *state = (BTPageState *) palloc(sizeof(BTPageState));
(void) memset((char *) state, 0, sizeof(BTPageState));
memset((char *) state, 0, sizeof(BTPageState));
_bt_blnewpage(index, &(state->btps_buf), &(state->btps_page), flags);
state->btps_firstoff = InvalidOffsetNumber;
state->btps_lastoff = P_HIKEY;
@@ -1005,7 +1005,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
_bt_pagestate(index, 0, state->btps_level + 1, true);
}
nbti = _bt_minitem(opage, BufferGetBlockNumber(obuf), 0);
(void) _bt_buildadd(index, state->btps_next, nbti, 0);
_bt_buildadd(index, state->btps_next, nbti, 0);
pfree((void *) nbti);
}
@@ -1081,7 +1081,7 @@ _bt_uppershutdown(Relation index, BTPageState *state)
_bt_metaproot(index, blkno, s->btps_level + 1);
} else {
bti = _bt_minitem(s->btps_page, blkno, 0);
(void) _bt_buildadd(index, s->btps_next, bti, 0);
_bt_buildadd(index, s->btps_next, bti, 0);
pfree((void *) bti);
}
}
@@ -1158,7 +1158,7 @@ _bt_merge(Relation index, BTSpool *btspool)
* _bt_taperead will return 0 only if the tape is actually
* at EOF.
*/
(void) memset((char *) &q, 0, sizeof(BTPriQueue));
memset((char *) &q, 0, sizeof(BTPriQueue));
goodtapes = 0;
for (t = 0; t < btspool->bts_ntapes; ++t) {
itape = btspool->bts_itape[t];
@@ -1207,7 +1207,7 @@ _bt_merge(Relation index, BTSpool *btspool)
btisz = BTITEMSZ(bti);
btisz = DOUBLEALIGN(btisz);
if (doleaf) {
(void) _bt_buildadd(index, state, bti, BTP_LEAF);
_bt_buildadd(index, state, bti, BTP_LEAF);
#if defined(FASTBUILD_DEBUG) && defined(FASTBUILD_MERGE)
{
bool isnull;
@@ -1361,7 +1361,7 @@ _bt_upperbuild(Relation index)
d, state->btps_level);
}
#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
(void) _bt_buildadd(index, state, nbti, 0);
_bt_buildadd(index, state, nbti, 0);
pfree((void *) nbti);
}
blk = ropaque->btpo_next;