Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit65577dc

Browse files
committed
Mop up from caddr_t -> Datum conversion to make things extra type safe
1 parent416bbbf commit65577dc

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

‎src/backend/libpq/pqcomm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
3030
* Portions Copyright (c) 1994, Regents of the University of California
3131
*
32-
*$Id: pqcomm.c,v 1.102 2000/10/0219:42:46 petere Exp $
32+
*$Id: pqcomm.c,v 1.103 2000/10/0221:45:31 petere Exp $
3333
*
3434
*-------------------------------------------------------------------------
3535
*/
@@ -152,7 +152,7 @@ static char sock_path[MAXPGPATH];
152152
* If a Unix socket is used for communication, explicitly close it.
153153
*/
154154
staticvoid
155-
StreamDoUnlink()
155+
StreamDoUnlink(void)
156156
{
157157
Assert(sock_path[0]);
158158
unlink(sock_path);

‎src/backend/storage/ipc/sinvaladt.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.33 2000/10/0219:42:48 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.34 2000/10/0221:45:32 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -27,7 +27,7 @@ SISeg *shmInvalBuffer;
2727

2828
staticvoidSISegmentAttach(IpcMemoryIdshmid);
2929
staticvoidSISegInit(SISeg*segP,intmaxBackends);
30-
staticvoidCleanupInvalidationState(intstatus,SISeg*segP);
30+
staticvoidCleanupInvalidationState(intstatus,Datumarg);
3131
staticvoidSISetProcStateInvalid(SISeg*segP);
3232

3333
/*
@@ -200,11 +200,14 @@ SIBackendInit(SISeg *segP)
200200
*
201201
* This function is called via on_shmem_exit() during backend shutdown,
202202
* so the caller has NOT acquired the lock for us.
203+
*
204+
* arg is really of type "SISeg*".
203205
*/
204206
staticvoid
205-
CleanupInvalidationState(intstatus,
206-
SISeg*segP)
207+
CleanupInvalidationState(intstatus,Datumarg)
207208
{
209+
SISeg*segP= (void*)DatumGetPointer(arg);
210+
208211
Assert(PointerIsValid(segP));
209212

210213
SpinAcquire(SInvalLock);

‎src/backend/storage/lmgr/proc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.80 2000/10/0219:42:48 petere Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.81 2000/10/0221:45:32 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -47,7 +47,7 @@
4747
*This is so that we can support more backends. (system-wide semaphore
4848
*sets run out pretty fast.) -ay 4/95
4949
*
50-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.80 2000/10/0219:42:48 petere Exp $
50+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.81 2000/10/0221:45:32 petere Exp $
5151
*/
5252
#include"postgres.h"
5353

@@ -88,7 +88,7 @@ static PROC_HDR *ProcGlobal = NULL;
8888

8989
PROC*MyProc=NULL;
9090

91-
staticvoidProcKill(intexitStatus,intpid);
91+
staticvoidProcKill(intexitStatus,Datumpid);
9292
staticvoidProcGetNewSemKeyAndNum(IPCKey*key,int*semNum);
9393
staticvoidProcFreeSem(IpcSemaphoreKeysemKey,intsemNum);
9494

@@ -396,7 +396,7 @@ ProcRemove(int pid)
396396
*this process. Release any of its held spin locks.
397397
*/
398398
staticvoid
399-
ProcKill(intexitStatus,intpid)
399+
ProcKill(intexitStatus,Datumpid)
400400
{
401401
PROC*proc;
402402
SHMEM_OFFSETlocation;
@@ -416,7 +416,7 @@ ProcKill(int exitStatus, int pid)
416416

417417
proc= (PROC*)MAKE_PTR(location);
418418

419-
Assert(proc==MyProc||pid!=MyProcPid);
419+
Assert(proc==MyProc||(int)pid!=MyProcPid);
420420

421421
MyProc=NULL;
422422

‎src/backend/storage/smgr/smgr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.38 2000/10/0219:42:52 petere Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.39 2000/10/0221:45:33 petere Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
1818
#include"postgres.h"
1919

2020
#include"storage/smgr.h"
2121

22-
staticvoidsmgrshutdown(intdummy);
22+
staticvoidsmgrshutdown(void);
2323

2424
typedefstructf_smgr
2525
{
@@ -118,7 +118,7 @@ smgrinit()
118118
}
119119

120120
staticvoid
121-
smgrshutdown(intdummy)
121+
smgrshutdown(void)
122122
{
123123
inti;
124124

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp