Fix for "might be used uninitialized" warnings.
This commit is contained in:
parent
f0e7004d29
commit
c7cba5780f
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.9 1996/11/27 07:27:20 vadim Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.10 1996/11/28 04:37:38 vadim Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -245,7 +245,7 @@ _vc_getrels(Portal p, NameData *VacRelP)
|
||||||
}
|
}
|
||||||
|
|
||||||
portalmem = PortalGetVariableMemory(p);
|
portalmem = PortalGetVariableMemory(p);
|
||||||
vrl = (VRelList) NULL;
|
vrl = cur = (VRelList) NULL;
|
||||||
|
|
||||||
pgclass = heap_openr(RelationRelationName);
|
pgclass = heap_openr(RelationRelationName);
|
||||||
pgcdesc = RelationGetTupleDescriptor(pgclass);
|
pgcdesc = RelationGetTupleDescriptor(pgclass);
|
||||||
|
@ -511,7 +511,6 @@ _vc_scanheap (VRelList curvrl, Relation onerel,
|
||||||
page = BufferGetPage(buf);
|
page = BufferGetPage(buf);
|
||||||
vpc->vpd_blkno = blkno;
|
vpc->vpd_blkno = blkno;
|
||||||
vpc->vpd_noff = 0;
|
vpc->vpd_noff = 0;
|
||||||
vpc->vpd_noff = 0;
|
|
||||||
|
|
||||||
if (PageIsNew(page)) {
|
if (PageIsNew(page)) {
|
||||||
elog (NOTICE, "Rel %.*s: Uninitialized page %u - fixing",
|
elog (NOTICE, "Rel %.*s: Uninitialized page %u - fixing",
|
||||||
|
@ -734,19 +733,19 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
|
||||||
{
|
{
|
||||||
TransactionId myXID;
|
TransactionId myXID;
|
||||||
CommandId myCID;
|
CommandId myCID;
|
||||||
AbsoluteTime myCTM;
|
AbsoluteTime myCTM = 0;
|
||||||
Buffer buf, ToBuf;
|
Buffer buf, ToBuf;
|
||||||
int nblocks, blkno;
|
int nblocks, blkno;
|
||||||
Page page, ToPage;
|
Page page, ToPage = NULL;
|
||||||
OffsetNumber offnum, maxoff, newoff, moff;
|
OffsetNumber offnum = 0, maxoff = 0, newoff, moff;
|
||||||
ItemId itemid, newitemid;
|
ItemId itemid, newitemid;
|
||||||
HeapTuple htup, newtup;
|
HeapTuple htup, newtup;
|
||||||
TupleDesc tupdesc;
|
TupleDesc tupdesc = NULL;
|
||||||
Datum *idatum;
|
Datum *idatum = NULL;
|
||||||
char *inulls;
|
char *inulls = NULL;
|
||||||
InsertIndexResult iresult;
|
InsertIndexResult iresult;
|
||||||
VPageListData Nvpl;
|
VPageListData Nvpl;
|
||||||
VPageDescr ToVpd, Fvplast, Vvplast, vpc, *vpp;
|
VPageDescr ToVpd = NULL, Fvplast, Vvplast, vpc, *vpp;
|
||||||
IndDesc *Idesc, *idcur;
|
IndDesc *Idesc, *idcur;
|
||||||
int Fblklast, Vblklast, i;
|
int Fblklast, Vblklast, i;
|
||||||
Size tlen;
|
Size tlen;
|
||||||
|
@ -803,7 +802,7 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
|
||||||
nmoved = 0;
|
nmoved = 0;
|
||||||
|
|
||||||
vpc = (VPageDescr) palloc (sizeof(VPageDescrData) + MaxOffsetNumber*sizeof(OffsetNumber));
|
vpc = (VPageDescr) palloc (sizeof(VPageDescrData) + MaxOffsetNumber*sizeof(OffsetNumber));
|
||||||
vpc->vpd_nusd = 0;
|
vpc->vpd_nusd = vpc->vpd_noff = 0;
|
||||||
|
|
||||||
nblocks = curvrl->vrl_npages;
|
nblocks = curvrl->vrl_npages;
|
||||||
for (blkno = nblocks - Vvpl->vpl_nemend - 1; ; blkno--)
|
for (blkno = nblocks - Vvpl->vpl_nemend - 1; ; blkno--)
|
||||||
|
@ -819,6 +818,7 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
|
||||||
|
|
||||||
isempty = PageIsEmpty(page);
|
isempty = PageIsEmpty(page);
|
||||||
|
|
||||||
|
dowrite = false;
|
||||||
if ( blkno == Vblklast ) /* it's reapped page */
|
if ( blkno == Vblklast ) /* it's reapped page */
|
||||||
{
|
{
|
||||||
if ( Vvplast->vpd_noff > 0 ) /* there are dead tuples */
|
if ( Vvplast->vpd_noff > 0 ) /* there are dead tuples */
|
||||||
|
@ -851,7 +851,6 @@ _vc_rpfheap (VRelList curvrl, Relation onerel,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Assert ( ! isempty );
|
Assert ( ! isempty );
|
||||||
dowrite = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vpc->vpd_blkno = blkno;
|
vpc->vpd_blkno = blkno;
|
||||||
|
|
Loading…
Reference in New Issue