(void *) with shmat

Started by Ulrich Neumannabout 24 years ago3 messages
#1Ulrich Neumann
u_neumann@gne.de

Hello together,

In ipc.c, function InternalIpcMemoryCreate there is the following line of code:
memAddress = shmat(shmid, 0, 0);

this line should be changed to:
memAddress = (void *) shmat(shmid, 0, 0);

at function IpcMemoryCreate there is the following line of code:
memAddress = shmat(shmid, 0, 0);

this line should be changed to:
memAddress = (void *) shmat(shmid, 0, 0);

This will avoid problems with MetroWerks CodeWarrior compiler.

Thanks

Ulrich Neumann

#2mlw
markw@mohawksoft.com
In reply to: Ulrich Neumann (#1)
Re: (void *) with shmat

Why is this needed?

shmat is defined as returning a void *. Is it not so with MetroWerks?

Ulrich Neumann wrote:

Show quoted text

Hello together,

In ipc.c, function InternalIpcMemoryCreate there is the following line of code:
memAddress = shmat(shmid, 0, 0);

this line should be changed to:
memAddress = (void *) shmat(shmid, 0, 0);

at function IpcMemoryCreate there is the following line of code:
memAddress = shmat(shmid, 0, 0);

this line should be changed to:
memAddress = (void *) shmat(shmid, 0, 0);

This will avoid problems with MetroWerks CodeWarrior compiler.

Thanks

Ulrich Neumann

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ulrich Neumann (#1)
Re: (void *) with shmat

Ulrich Neumann<u_neumann@gne.de> writes:

This will avoid problems with MetroWerks CodeWarrior compiler.

What, pray tell, does MetroWerks think shmat returns?

regards, tom lane