1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Use makeNode() to allocate structures that have to be cast to Node *,

rather than allocating them on the stack.

Fixes complaint from gcc 3.3.1.
This commit is contained in:
Bruce Momjian
2003-10-12 23:19:21 +00:00
parent 037468eff2
commit 4a2c34d4a0
3 changed files with 46 additions and 44 deletions

View File

@ -10,7 +10,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.19 2003/10/11 18:04:25 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.20 2003/10/12 23:19:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -365,7 +365,7 @@ PGSharedMemoryAttach(IpcMemoryKey key, IpcMemoryId *shmid)
if (hdr->magic != PGShmemMagic)
{
shmdt(hdr);
shmdt((void *)hdr);
return NULL; /* segment belongs to a non-Postgres app */
}