aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-04-02 04:51:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-04-02 04:51:05 +0000
commit0b874f01ddd899e21275934bc078cf189c3dd06c (patch)
tree73bed4ce02f218f6c3f7622d7cc70002087fe929 /src
parentb5b5852c26a75e23fab995b4e5f6448088538891 (diff)
downloadpostgresql-0b874f01ddd899e21275934bc078cf189c3dd06c.tar.gz
postgresql-0b874f01ddd899e21275934bc078cf189c3dd06c.zip
Clean up compile errors and warnings, cf Billy Allie's
complaints (and some of my own).
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/vacuum.c13
-rw-r--r--src/backend/storage/ipc/shmem.c3
-rw-r--r--src/include/storage/shmem.h3
3 files changed, 9 insertions, 10 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 285a256f574..6cf4407ff76 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.97 1999/03/28 20:32:01 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.98 1999/04/02 04:51:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -66,7 +66,6 @@ static Portal vc_portal;
static int MESSAGE_LEVEL; /* message level */
static TransactionId XmaxRecent;
-extern void GetXmaxRecent(TransactionId *xid);
#define swapLong(a,b) {long tmp; tmp=a; a=b; b=tmp;}
#define swapInt(a,b) {int tmp; tmp=a; a=b; b=tmp;}
@@ -2421,16 +2420,16 @@ vc_find_eq(void *bot, int nelem, int size, void *elm,
}
if (last_move == true)
{
- res = compar(elm, bot + last * size);
+ res = compar(elm, (void *)((char *)bot + last * size));
if (res > 0)
return NULL;
if (res == 0)
- return bot + last * size;
+ return (void *)((char *)bot + last * size);
last_move = false;
}
- res = compar(elm, bot + celm * size);
+ res = compar(elm, (void *)((char *)bot + celm * size));
if (res == 0)
- return bot + celm * size;
+ return (void *)((char *)bot + celm * size);
if (res < 0)
{
if (celm == 0)
@@ -2445,7 +2444,7 @@ vc_find_eq(void *bot, int nelem, int size, void *elm,
return NULL;
last = last - celm - 1;
- bot = bot + (celm + 1) * size;
+ bot = (void *)((char *)bot + (celm + 1) * size);
celm = (last + 1) / 2;
first_move = true;
}
diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c
index 55ecd857970..421cd399c64 100644
--- a/src/backend/storage/ipc/shmem.c
+++ b/src/backend/storage/ipc/shmem.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.38 1999/03/28 20:32:22 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.39 1999/04/02 04:51:03 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -737,5 +737,4 @@ GetXmaxRecent(TransactionId *XmaxRecent)
SpinRelease(ShmemIndexLock);
elog(ERROR, "GetXmaxRecent: ShmemIndex corrupted");
- return NULL;
}
diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h
index f74ebe78ba0..7f5ed84aacd 100644
--- a/src/include/storage/shmem.h
+++ b/src/include/storage/shmem.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: shmem.h,v 1.15 1999/02/13 23:22:10 momjian Exp $
+ * $Id: shmem.h,v 1.16 1999/04/02 04:51:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -71,6 +71,7 @@ extern SHMEM_OFFSET ShmemPIDDestroy(int pid);
extern long *ShmemInitStruct(char *name, unsigned long size,
bool *foundPtr);
extern bool TransactionIdIsInProgress(TransactionId xid);
+extern void GetXmaxRecent(TransactionId *XmaxRecent);
typedef int TableID;