mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 10:30:33 +03:00 
			
		
		
		
	Remove more (void) and fix -Wall warnings.
This commit is contained in:
		| @@ -706,7 +706,7 @@ gistSplit(Relation r, | ||||
| 	item = (IndexTuple) PageGetItem(p, itemid); | ||||
| 	 | ||||
| 	if (i == *(v.spl_left)) { | ||||
| 	    (void) gistPageAddItem(giststate, r, left, (Item) item,  | ||||
| 	    gistPageAddItem(giststate, r, left, (Item) item,  | ||||
| 				   IndexTupleSize(item), | ||||
| 				   leftoff, LP_USED, &tmpdentry, &newtup); | ||||
| 	    leftoff = OffsetNumberNext(leftoff); | ||||
| @@ -718,7 +718,7 @@ gistSplit(Relation r, | ||||
| 	      pfree(newtup); | ||||
| 	}  | ||||
| 	else { | ||||
| 	    (void) gistPageAddItem(giststate, r, right, (Item) item,  | ||||
| 	    gistPageAddItem(giststate, r, right, (Item) item,  | ||||
| 				   IndexTupleSize(item), | ||||
| 				   rightoff, LP_USED, &tmpdentry, &newtup); | ||||
| 	    rightoff = OffsetNumberNext(rightoff); | ||||
| @@ -736,7 +736,7 @@ gistSplit(Relation r, | ||||
|      | ||||
|     /* now insert the new index tuple */ | ||||
|     if (*(v.spl_left) != FirstOffsetNumber) { | ||||
| 	(void) gistPageAddItem(giststate, r, left, (Item) itup,  | ||||
| 	gistPageAddItem(giststate, r, left, (Item) itup,  | ||||
| 			       IndexTupleSize(itup), | ||||
| 			       leftoff, LP_USED, &tmpdentry, &newtup); | ||||
| 	leftoff = OffsetNumberNext(leftoff); | ||||
| @@ -747,7 +747,7 @@ gistSplit(Relation r, | ||||
| 	if (itup != newtup)  | ||||
| 	  pfree(newtup); | ||||
|     } else { | ||||
| 	(void) gistPageAddItem(giststate, r, right, (Item) itup,  | ||||
| 	gistPageAddItem(giststate, r, right, (Item) itup,  | ||||
| 			       IndexTupleSize(itup), | ||||
| 			       rightoff, LP_USED, &tmpdentry, &newtup); | ||||
| 	rightoff = OffsetNumberNext(rightoff); | ||||
| @@ -852,7 +852,7 @@ gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup, | ||||
| 	pfree(res); | ||||
| 	gistdoinsert(r, rtup, giststate); | ||||
|     } else { | ||||
|         (void) gistPageAddItem(giststate, r, p, (Item)ltup,  | ||||
|         gistPageAddItem(giststate, r, p, (Item)ltup,  | ||||
| 			       IndexTupleSize(ltup), InvalidOffsetNumber,  | ||||
| 			       LP_USED, &tmpentry, &newtup); | ||||
| 	WriteBuffer(b); | ||||
| @@ -863,7 +863,7 @@ gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup, | ||||
| 	  pfree(tmpentry.pred); | ||||
| 	if (ltup != newtup) | ||||
| 	  pfree(newtup); | ||||
| 	(void)gistentryinsert(r, stk, rtup, giststate); | ||||
| 	gistentryinsert(r, stk, rtup, giststate); | ||||
|     } | ||||
| }   | ||||
|  | ||||
| @@ -919,7 +919,7 @@ gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt) | ||||
|     b = ReadBuffer(r, GISTP_ROOT); | ||||
|     GISTInitBuffer(b, 0); | ||||
|     p = BufferGetPage(b); | ||||
|     (void) gistPageAddItem(giststate, r, p, (Item) lt, IndexTupleSize(lt),  | ||||
|     gistPageAddItem(giststate, r, p, (Item) lt, IndexTupleSize(lt),  | ||||
| 			   FirstOffsetNumber, | ||||
| 			   LP_USED, &tmpentry, &newtup); | ||||
|     /* be tidy */ | ||||
| @@ -927,7 +927,7 @@ gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt, IndexTuple rt) | ||||
|       pfree(tmpentry.pred); | ||||
|     if (lt != newtup) | ||||
|       pfree(newtup); | ||||
|     (void) gistPageAddItem(giststate, r, p, (Item) rt, IndexTupleSize(rt), | ||||
|     gistPageAddItem(giststate, r, p, (Item) rt, IndexTupleSize(rt), | ||||
| 			   OffsetNumberNext(FirstOffsetNumber), LP_USED, | ||||
| 			   &tmpentry, &newtup); | ||||
|     /* be tidy */ | ||||
| @@ -1261,7 +1261,7 @@ char *text_range_out(TXTRANGE *r) | ||||
|     memcpy(upper, VARDATA(TRUPPER(r)), VARSIZE(TRUPPER(r)) - VARHDRSZ); | ||||
|     upper[VARSIZE(TRUPPER(r)) - VARHDRSZ] = '\0'; | ||||
|  | ||||
|     (void) sprintf(result, "[%s,%s): %d", lower, upper, r->flag); | ||||
|     sprintf(result, "[%s,%s): %d", lower, upper, r->flag); | ||||
|     pfree(lower); | ||||
|     pfree(upper); | ||||
|     return(result); | ||||
| @@ -1275,7 +1275,7 @@ int_range_out(INTRANGE *r) | ||||
|     if (r == NULL) | ||||
| 	return(NULL); | ||||
|     result = (char *)palloc(80); | ||||
|     (void) sprintf(result, "[%d,%d): %d",r->lower, r->upper, r->flag); | ||||
|     sprintf(result, "[%d,%d): %d",r->lower, r->upper, r->flag); | ||||
|  | ||||
|     return(result); | ||||
| } | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.7 1996/11/05 09:40:18 scrappy Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.8 1997/08/12 22:51:30 momjian Exp $ | ||||
|  * | ||||
|  *------------------------------------------------------------------------- | ||||
|  */ | ||||
| @@ -223,7 +223,7 @@ _hash_pgaddtup(Relation rel, | ||||
|     _hash_checkpage(page, LH_BUCKET_PAGE|LH_OVERFLOW_PAGE); | ||||
|  | ||||
|     itup_off = OffsetNumberNext(PageGetMaxOffsetNumber(page)); | ||||
|     (void) PageAddItem(page, (Item) hitem, itemsize, itup_off, LP_USED); | ||||
|     PageAddItem(page, (Item) hitem, itemsize, itup_off, LP_USED); | ||||
|      | ||||
|     /* write the buffer, but hold our lock */ | ||||
|     _hash_wrtnorelbuf(rel, buf); | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.8 1996/11/05 09:40:20 scrappy Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.9 1997/08/12 22:51:34 momjian Exp $ | ||||
|  * | ||||
|  * NOTES | ||||
|  *    Overflow pages look like ordinary relation pages. | ||||
| @@ -315,7 +315,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf) | ||||
|     nextblkno = ovflopaque->hasho_nextblkno; | ||||
|     prevblkno = ovflopaque->hasho_prevblkno; | ||||
|     bucket = ovflopaque->hasho_bucket; | ||||
|     (void) memset(ovflpage, 0, BufferGetPageSize(ovflbuf)); | ||||
|     memset(ovflpage, 0, BufferGetPageSize(ovflbuf)); | ||||
|     _hash_wrtbuf(rel, ovflbuf); | ||||
|      | ||||
|     /*  | ||||
| @@ -436,8 +436,8 @@ _hash_initbitmap(Relation rel, | ||||
|     /* set all of the bits above 'nbits' to 1 */ | ||||
|     clearints = ((nbits - 1) >> INT_TO_BIT) + 1; | ||||
|     clearbytes = clearints << INT_TO_BYTE; | ||||
|     (void) memset((char *) freep, 0, clearbytes); | ||||
|     (void) memset(((char *) freep) + clearbytes, 0xFF, | ||||
|     memset((char *) freep, 0, clearbytes); | ||||
|     memset(((char *) freep) + clearbytes, 0xFF, | ||||
| 		  BMPGSZ_BYTE(metap) - clearbytes); | ||||
|     freep[clearints - 1] = ALL_SET << (nbits & INT_MASK); | ||||
|  | ||||
| @@ -566,7 +566,7 @@ _hash_squeezebucket(Relation rel, | ||||
| 	 * page. | ||||
| 	 */ | ||||
| 	woffnum = OffsetNumberNext(PageGetMaxOffsetNumber(wpage)); | ||||
| 	(void) PageAddItem(wpage, (Item) hitem, itemsz, woffnum, LP_USED); | ||||
| 	PageAddItem(wpage, (Item) hitem, itemsz, woffnum, LP_USED); | ||||
| 	 | ||||
| 	/*  | ||||
| 	 * delete the tuple from the "read" page. | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.7 1996/11/05 09:40:21 scrappy Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.8 1997/08/12 22:51:37 momjian Exp $ | ||||
|  * | ||||
|  * NOTES | ||||
|  *    Postgres hash pages look like ordinary relation pages.  The opaque | ||||
| @@ -609,7 +609,7 @@ _hash_splitpage(Relation rel, | ||||
| 	    } | ||||
| 	     | ||||
| 	    noffnum = OffsetNumberNext(PageGetMaxOffsetNumber(npage)); | ||||
| 	    (void) PageAddItem(npage, (Item) hitem, itemsz, noffnum, LP_USED); | ||||
| 	    PageAddItem(npage, (Item) hitem, itemsz, noffnum, LP_USED); | ||||
| 	    _hash_wrtnorelbuf(rel, nbuf); | ||||
| 	     | ||||
| 	    /* | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.12 1997/08/06 02:08:39 vadim Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.13 1997/08/12 22:51:40 momjian Exp $ | ||||
|  * | ||||
|  * | ||||
|  * INTERFACE ROUTINES | ||||
| @@ -548,7 +548,7 @@ heap_close(Relation relation) | ||||
|     IncrHeapAccessStat(local_close); | ||||
|     IncrHeapAccessStat(global_close); | ||||
|      | ||||
|     (void) RelationClose(relation); | ||||
|     RelationClose(relation); | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.9 1996/11/10 02:58:11 momjian Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/heap/Attic/stats.c,v 1.10 1997/08/12 22:51:44 momjian Exp $ | ||||
|  * | ||||
|  * NOTES | ||||
|  *    initam should be moved someplace else. | ||||
| @@ -116,7 +116,7 @@ InitHeapAccessStatistics() | ||||
|      *  return to old memory context | ||||
|      * ---------------- | ||||
|      */ | ||||
|     (void) MemoryContextSwitchTo(oldContext); | ||||
|     MemoryContextSwitchTo(oldContext); | ||||
|      | ||||
|     heap_access_stats = stats; | ||||
| } | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.10 1997/01/10 09:46:25 vadim Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.11 1997/08/12 22:51:48 momjian Exp $ | ||||
|  * | ||||
|  * INTERFACE ROUTINES | ||||
|  *	index_open 	- open an index relation by relationId | ||||
| @@ -153,7 +153,7 @@ index_openr(char *relationName) | ||||
| void | ||||
| index_close(Relation relation) | ||||
| { | ||||
|     (void) RelationClose(relation); | ||||
|     RelationClose(relation); | ||||
| } | ||||
|  | ||||
| /* ---------------- | ||||
| @@ -212,7 +212,7 @@ index_delete(Relation relation, ItemPointer indexItem) | ||||
|     RELATION_CHECKS; | ||||
|     GET_REL_PROCEDURE(delete,amdelete); | ||||
|      | ||||
|     (void) fmgr(procedure, relation, indexItem);     | ||||
|     fmgr(procedure, relation, indexItem);     | ||||
| } | ||||
|  | ||||
| /* ---------------- | ||||
| @@ -251,7 +251,7 @@ index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key) | ||||
|     SCAN_CHECKS; | ||||
|     GET_SCAN_PROCEDURE(rescan,amrescan); | ||||
|      | ||||
|     (void) fmgr(procedure, scan, scanFromEnd, key); | ||||
|     fmgr(procedure, scan, scanFromEnd, key); | ||||
| } | ||||
|  | ||||
| /* ---------------- | ||||
| @@ -266,7 +266,7 @@ index_endscan(IndexScanDesc scan) | ||||
|     SCAN_CHECKS; | ||||
|     GET_SCAN_PROCEDURE(endscan,amendscan); | ||||
|      | ||||
|     (void) fmgr(procedure, scan); | ||||
|     fmgr(procedure, scan); | ||||
|      | ||||
|     RelationUnsetRIntentLock(scan->relation); | ||||
| } | ||||
| @@ -283,7 +283,7 @@ index_markpos(IndexScanDesc scan) | ||||
|     SCAN_CHECKS; | ||||
|     GET_SCAN_PROCEDURE(markpos,ammarkpos); | ||||
|      | ||||
|     (void) fmgr(procedure, scan); | ||||
|     fmgr(procedure, scan); | ||||
| } | ||||
|  | ||||
| /* ---------------- | ||||
| @@ -298,7 +298,7 @@ index_restrpos(IndexScanDesc scan) | ||||
|     SCAN_CHECKS; | ||||
|     GET_SCAN_PROCEDURE(restrpos,amrestrpos); | ||||
|      | ||||
|     (void) fmgr(procedure, scan); | ||||
|     fmgr(procedure, scan); | ||||
| } | ||||
|  | ||||
| /* ---------------- | ||||
|   | ||||
| @@ -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; | ||||
| 	 | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.12 1997/03/14 23:17:46 scrappy Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.13 1997/08/12 22:51:54 momjian Exp $ | ||||
|  * | ||||
|  *------------------------------------------------------------------------- | ||||
|  */ | ||||
| @@ -501,12 +501,12 @@ dosplit(Relation r, | ||||
| 	item = (IndexTuple) PageGetItem(p, itemid); | ||||
| 	 | ||||
| 	if (i == *(v.spl_left)) { | ||||
| 	    (void) PageAddItem(left, (Item) item, IndexTupleSize(item), | ||||
| 	    PageAddItem(left, (Item) item, IndexTupleSize(item), | ||||
| 			       leftoff, LP_USED); | ||||
| 	    leftoff = OffsetNumberNext(leftoff); | ||||
| 	    v.spl_left++;	/* advance in left split vector */ | ||||
| 	} else { | ||||
| 	    (void) PageAddItem(right, (Item) item, IndexTupleSize(item), | ||||
| 	    PageAddItem(right, (Item) item, IndexTupleSize(item), | ||||
| 			       rightoff, LP_USED); | ||||
| 	    rightoff = OffsetNumberNext(rightoff); | ||||
| 	    v.spl_right++;	/* advance in right split vector */ | ||||
| @@ -518,12 +518,12 @@ dosplit(Relation r, | ||||
|      | ||||
|     /* now insert the new index tuple */ | ||||
|     if (*(v.spl_left) != FirstOffsetNumber) { | ||||
| 	(void) PageAddItem(left, (Item) itup, IndexTupleSize(itup), | ||||
| 	PageAddItem(left, (Item) itup, IndexTupleSize(itup), | ||||
| 			   leftoff, LP_USED); | ||||
| 	leftoff = OffsetNumberNext(leftoff); | ||||
| 	ItemPointerSet(&(res->pointerData), lbknum, leftoff); | ||||
|     } else { | ||||
| 	(void) PageAddItem(right, (Item) itup, IndexTupleSize(itup), | ||||
| 	PageAddItem(right, (Item) itup, IndexTupleSize(itup), | ||||
| 			   rightoff, LP_USED); | ||||
| 	rightoff = OffsetNumberNext(rightoff); | ||||
| 	ItemPointerSet(&(res->pointerData), rbknum, rightoff); | ||||
| @@ -617,7 +617,7 @@ rtintinsert(Relation r, | ||||
| 	WriteBuffer(b);  /* don't forget to release buffer!  - 01/31/94 */ | ||||
| 	pfree(res); | ||||
|     } else { | ||||
| 	(void) PageAddItem(p, (Item) rtup, IndexTupleSize(rtup), | ||||
| 	PageAddItem(p, (Item) rtup, IndexTupleSize(rtup), | ||||
| 			   PageGetMaxOffsetNumber(p), LP_USED); | ||||
| 	WriteBuffer(b); | ||||
| 	ldatum = (((char *) ltup) + sizeof(IndexTupleData)); | ||||
| @@ -640,9 +640,9 @@ rtnewroot(Relation r, IndexTuple lt, IndexTuple rt) | ||||
|     b = ReadBuffer(r, P_ROOT); | ||||
|     RTInitBuffer(b, 0); | ||||
|     p = BufferGetPage(b); | ||||
|     (void) PageAddItem(p, (Item) lt, IndexTupleSize(lt), | ||||
|     PageAddItem(p, (Item) lt, IndexTupleSize(lt), | ||||
| 		       FirstOffsetNumber, LP_USED); | ||||
|     (void) PageAddItem(p, (Item) rt, IndexTupleSize(rt), | ||||
|     PageAddItem(p, (Item) rt, IndexTupleSize(rt), | ||||
| 		       OffsetNumberNext(FirstOffsetNumber), LP_USED); | ||||
|     WriteBuffer(b); | ||||
| } | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.7 1996/12/14 05:20:39 vadim Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.8 1997/08/12 22:51:57 momjian Exp $ | ||||
|  * | ||||
|  * NOTES | ||||
|  *    This file contains support functions for the high | ||||
| @@ -641,7 +641,7 @@ TransGetLastRecordedTransaction(Relation relation, | ||||
|     baseXid = blockNumber * TP_NumXidStatusPerBlock; | ||||
|  | ||||
| /* XXX ???? xid won't get returned! - AY '94 */ | ||||
|     (void) TransBlockGetLastTransactionIdStatus(block, baseXid, &xid); | ||||
|     TransBlockGetLastTransactionIdStatus(block, baseXid, &xid); | ||||
|      | ||||
|     ReleaseBuffer(buffer); | ||||
|      | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.7 1997/01/16 07:59:11 vadim Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.8 1997/08/12 22:51:58 momjian Exp $ | ||||
|  * | ||||
|  *------------------------------------------------------------------------- | ||||
|  */ | ||||
| @@ -159,7 +159,7 @@ VariableRelationPutNextXid(TransactionId xid) | ||||
|      | ||||
|     flushmode = SetBufferWriteMode (BUFFER_FLUSH_WRITE); | ||||
|     WriteBuffer(buf); | ||||
|     (void) SetBufferWriteMode (flushmode); | ||||
|     SetBufferWriteMode (flushmode); | ||||
| } | ||||
|  | ||||
| /* -------------------------------- | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.10 1997/04/02 03:38:02 vadim Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.11 1997/08/12 22:52:01 momjian Exp $ | ||||
|  *	 | ||||
|  * NOTES | ||||
|  *	Transaction aborts can now occur two ways: | ||||
| @@ -506,7 +506,7 @@ AtStart_Memory() | ||||
|      *	tell system to allocate in the blank portal context | ||||
|      * ---------------- | ||||
|      */ | ||||
|     (void) MemoryContextSwitchTo(portalContext); | ||||
|     MemoryContextSwitchTo(portalContext); | ||||
|     StartPortalAllocMode(DefaultAllocMode, 0); | ||||
| } | ||||
|  | ||||
| @@ -612,7 +612,7 @@ AtCommit_Memory() | ||||
|      * ---------------- | ||||
|      */ | ||||
|     EndPortalAllocMode(); | ||||
|     (void) MemoryContextSwitchTo(TopMemoryContext); | ||||
|     MemoryContextSwitchTo(TopMemoryContext); | ||||
| } | ||||
|  | ||||
| /* ---------------------------------------------------------------- | ||||
| @@ -691,7 +691,7 @@ AtAbort_Memory() | ||||
|      *  portal memory context (until the next transaction). | ||||
|      * ---------------- | ||||
|      */ | ||||
|     (void) MemoryContextSwitchTo(TopMemoryContext); | ||||
|     MemoryContextSwitchTo(TopMemoryContext); | ||||
| } | ||||
|  | ||||
| /* ---------------------------------------------------------------- | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|  * | ||||
|  * | ||||
|  * IDENTIFICATION | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.5 1996/11/10 02:59:19 momjian Exp $ | ||||
|  *    $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/xid.c,v 1.6 1997/08/12 22:52:02 momjian Exp $ | ||||
|  * | ||||
|  * OLD COMMENTS | ||||
|  * XXX WARNING | ||||
| @@ -59,7 +59,7 @@ xidout(TransactionId transactionId) | ||||
|     /* maximum 32 bit unsigned integer representation takes 10 chars */ | ||||
|     representation = palloc(11); | ||||
|      | ||||
|     (void)sprintf(representation, "%u", transactionId); | ||||
|     sprintf(representation, "%u", transactionId); | ||||
|      | ||||
|     return (representation); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user