Re: (void *) with shmat - Mailing list pgsql-hackers

From mlw
Subject Re: (void *) with shmat
Date
Msg-id 3C3AE4CC.27247F10@mohawksoft.com
Whole thread Raw
In response to (void *) with shmat  (Ulrich Neumann<u_neumann@gne.de>)
List pgsql-hackers
Why is this needed?

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


Ulrich Neumann wrote:
> 
> 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


pgsql-hackers by date:

Previous
From: Ulrich Neumann
Date:
Subject: (void *) with shmat
Next
From: Hannu Krosing
Date:
Subject: Re: LWLock contention: I think I understand the problem