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

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...
This commit is contained in:
Tom Lane
2000-03-17 02:36:41 +00:00
parent bc1f117094
commit 341b328b18
37 changed files with 118 additions and 116 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.29 2000/02/26 05:25:54 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.30 2000/03/17 02:36:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -701,7 +701,7 @@ hash_search(HTAB *hashp,
long *
hash_seq(HTAB *hashp)
{
static uint32 curBucket = 0;
static long curBucket = 0;
static BUCKET_INDEX curIndex;
ELEMENT *curElem;
long segment_num;
@@ -848,7 +848,7 @@ expand_table(HTAB *hashp)
{
chain = GET_BUCKET(hashp, chainIndex);
nextIndex = chain->next;
if (call_hash(hashp, (char *) &(chain->key)) == old_bucket)
if ((long) call_hash(hashp, (char *) &(chain->key)) == old_bucket)
{
*old = chainIndex;
old = &chain->next;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.11 2000/01/26 05:57:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/hash/hashfn.c,v 1.12 2000/03/17 02:36:28 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -84,7 +84,7 @@ tag_hash(int *key, int keysize)
break;
default:
for (; keysize > (sizeof(int) - 1); keysize -= sizeof(int), key++)
for (; keysize >= (int) sizeof(int); keysize -= sizeof(int), key++)
h = h * PRIME1 ^ (*key);
/*