]> granicus.if.org Git - postgresql/commitdiff
Mop up from caddr_t -> Datum conversion to make things extra type safe
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 2 Oct 2000 21:45:33 +0000 (21:45 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 2 Oct 2000 21:45:33 +0000 (21:45 +0000)
src/backend/libpq/pqcomm.c
src/backend/storage/ipc/sinvaladt.c
src/backend/storage/lmgr/proc.c
src/backend/storage/smgr/smgr.c

index df66c7b1bde91197739acac485be007c2985c387..8417cd475abd279a0bddebd648d90b96cf138b00 100644 (file)
@@ -29,7 +29,7 @@
  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- *     $Id: pqcomm.c,v 1.102 2000/10/02 19:42:46 petere Exp $
+ *     $Id: pqcomm.c,v 1.103 2000/10/02 21:45:31 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -152,7 +152,7 @@ static char sock_path[MAXPGPATH];
  * If a Unix socket is used for communication, explicitly close it.
  */
 static void
-StreamDoUnlink()
+StreamDoUnlink(void)
 {
        Assert(sock_path[0]);
        unlink(sock_path);
index 2634f371a942be6cafa5ed400f2c0b5c38cfe24c..fcea99dd043f2a828aa6e7a316c24137c638415a 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.33 2000/10/02 19:42:48 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.34 2000/10/02 21:45:32 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -27,7 +27,7 @@ SISeg    *shmInvalBuffer;
 
 static void SISegmentAttach(IpcMemoryId shmid);
 static void SISegInit(SISeg *segP, int maxBackends);
-static void CleanupInvalidationState(int status, SISeg *segP);
+static void CleanupInvalidationState(int status, Datum arg);
 static void SISetProcStateInvalid(SISeg *segP);
 
 /*
@@ -200,11 +200,14 @@ SIBackendInit(SISeg *segP)
  *
  * This function is called via on_shmem_exit() during backend shutdown,
  * so the caller has NOT acquired the lock for us.
+ *
+ * arg is really of type "SISeg*".
  */
 static void
-CleanupInvalidationState(int status,
-                                                SISeg *segP)
+CleanupInvalidationState(int status, Datum arg)
 {
+       SISeg *segP = (void*) DatumGetPointer(arg);
+
        Assert(PointerIsValid(segP));
 
        SpinAcquire(SInvalLock);
index e68d96d772951f89f4aaf1093e92b152ca0eed26..fb5d06fd8b8995feedd0b215ba71d744063d9ac4 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.80 2000/10/02 19:42:48 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.81 2000/10/02 21:45:32 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -47,7 +47,7 @@
  *             This is so that we can support more backends. (system-wide semaphore
  *             sets run out pretty fast.)                                -ay 4/95
  *
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.80 2000/10/02 19:42:48 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.81 2000/10/02 21:45:32 petere Exp $
  */
 #include "postgres.h"
 
@@ -88,7 +88,7 @@ static PROC_HDR *ProcGlobal = NULL;
 
 PROC      *MyProc = NULL;
 
-static void ProcKill(int exitStatus, int pid);
+static void ProcKill(int exitStatus, Datum pid);
 static void ProcGetNewSemKeyAndNum(IPCKey *key, int *semNum);
 static void ProcFreeSem(IpcSemaphoreKey semKey, int semNum);
 
@@ -396,7 +396,7 @@ ProcRemove(int pid)
  *             this process. Release any of its held spin locks.
  */
 static void
-ProcKill(int exitStatus, int pid)
+ProcKill(int exitStatus, Datum pid)
 {
        PROC       *proc;
        SHMEM_OFFSET location;
@@ -416,7 +416,7 @@ ProcKill(int exitStatus, int pid)
 
        proc = (PROC *) MAKE_PTR(location);
 
-       Assert(proc == MyProc || pid != MyProcPid);
+       Assert(proc == MyProc || (int)pid != MyProcPid);
 
        MyProc = NULL;
 
index 1994028cdbd622b8c213f66023460daa01f13525..1eb17a60b2ef0385118c82b9d74a03dbd38077b1 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.38 2000/10/02 19:42:52 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.39 2000/10/02 21:45:33 petere Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -19,7 +19,7 @@
 
 #include "storage/smgr.h"
 
-static void smgrshutdown(int dummy);
+static void smgrshutdown(void);
 
 typedef struct f_smgr
 {
@@ -118,7 +118,7 @@ smgrinit()
 }
 
 static void
-smgrshutdown(int dummy)
+smgrshutdown(void)
 {
        int                     i;