diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-03-17 02:36:41 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-03-17 02:36:41 +0000 |
commit | 341b328b180e65d1fa5c8f2235cf101c8a12824f (patch) | |
tree | 88d54198ffa15aea581251471f8c062ae9e3142e /src/backend/access/heap/hio.c | |
parent | bc1f117094fbe2921f37923d8f7528284cb26dfc (diff) |
Fix a bunch of minor portability problems and maybe-bugs revealed by
running gcc and HP's cc with warnings cranked way up. Signed vs unsigned
comparisons, routines declared static and then defined not-static,
that kind of thing. Tedious, but perhaps useful...
Diffstat (limited to 'src/backend/access/heap/hio.c')
-rw-r--r-- | src/backend/access/heap/hio.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index 3bc21f7b4d6..b269ca90170 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Id: hio.c,v 1.29 2000/01/26 05:55:56 momjian Exp $ + * $Id: hio.c,v 1.30 2000/03/17 02:36:02 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -39,7 +39,7 @@ RelationPutHeapTuple(Relation relation, { Page pageHeader; OffsetNumber offnum; - unsigned int len; + Size len; ItemId itemId; Item item; @@ -51,8 +51,8 @@ RelationPutHeapTuple(Relation relation, IncrHeapAccessStat(global_RelationPutHeapTuple); pageHeader = (Page) BufferGetPage(buffer); - len = (unsigned) MAXALIGN(tuple->t_len); /* be conservative */ - Assert((int) len <= PageGetFreeSpace(pageHeader)); + len = MAXALIGN(tuple->t_len); /* be conservative */ + Assert(len <= PageGetFreeSpace(pageHeader)); offnum = PageAddItem((Page) pageHeader, (Item) tuple->t_data, tuple->t_len, InvalidOffsetNumber, LP_USED); @@ -104,18 +104,18 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple) Page pageHeader; BlockNumber lastblock; OffsetNumber offnum; - unsigned int len; + Size len; ItemId itemId; Item item; - len = (unsigned) MAXALIGN(tuple->t_len); /* be conservative */ + len = MAXALIGN(tuple->t_len); /* be conservative */ /* * If we're gonna fail for oversize tuple, do it right away... * this code should go away eventually. */ if (len > MaxTupleSize) - elog(ERROR, "Tuple is too big: size %d, max size %ld", + elog(ERROR, "Tuple is too big: size %u, max size %ld", len, MaxTupleSize); /* @@ -175,7 +175,7 @@ RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple) * test at the top of the routine, and the whole deal should * go away when we implement tuple splitting anyway... */ - elog(ERROR, "Tuple is too big: size %d", len); + elog(ERROR, "Tuple is too big: size %u", len); } } |