Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d51368d

Browse files
committed
This patch will stop gcc from issuing warnings about type-punned objects
when -fstrict-aliasing is turned on, as it is in the latest gcc when you use -O2 Andrew Dunstan
1 parent 386e0f9 commit d51368d

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/backend/commands/tablecmds.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.86 2003/10/06 16:38:27 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.87 2003/10/11 16:30:54 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -3525,7 +3525,7 @@ validateForeignKeyConstraint(FkConstraint *fkconstraint,
35253525
trigdata.tg_newtuple = NULL;
35263526
trigdata.tg_trigger = &trig;
35273527

3528-
fcinfo.context = (Node *) &trigdata;
3528+
fcinfo.context = (void *) &trigdata;
35293529

35303530
RI_FKey_check_ins(&fcinfo);
35313531
}

src/backend/executor/execQual.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.146 2003/09/25 23:02:11 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.147 2003/10/11 16:30:54 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -746,7 +746,7 @@ ExecMakeFunctionResult(FuncExprState *fcache,
746746
*/
747747
if (fcache->func.fn_retset)
748748
{
749-
fcinfo.resultinfo = (Node *) &rsinfo;
749+
fcinfo.resultinfo = (void *) &rsinfo;
750750
rsinfo.type = T_ReturnSetInfo;
751751
rsinfo.econtext = econtext;
752752
rsinfo.expectedDesc = NULL;
@@ -992,7 +992,7 @@ ExecMakeTableFunctionResult(ExprState *funcexpr,
992992
* doesn't actually get to see the resultinfo, but set it up anyway
993993
* because we use some of the fields as our own state variables.
994994
*/
995-
fcinfo.resultinfo = (Node *) &rsinfo;
995+
fcinfo.resultinfo = (void *) &rsinfo;
996996
rsinfo.type = T_ReturnSetInfo;
997997
rsinfo.econtext = econtext;
998998
rsinfo.expectedDesc = expectedDesc;

src/backend/port/sysv_shmem.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Portions Copyright (c) 1994, Regents of the University of California
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.17 2003/09/29 00:05:25 petere Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/port/sysv_shmem.c,v 1.18 2003/10/11 16:30:55 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -365,7 +365,7 @@ PGSharedMemoryAttach(IpcMemoryKey key, IpcMemoryId *shmid)
365365

366366
if (hdr->magic != PGShmemMagic)
367367
{
368-
shmdt(hdr);
368+
shmdt((void *) hdr);
369369
return NULL; /* segment belongs to a non-Postgres app */
370370
}
371371

src/backend/storage/lmgr/proc.c

+4-4
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.133 2003/08/04 02:40:03 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.134 2003/10/11 16:30:55 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1013,7 +1013,7 @@ enable_sig_alarm(int delayms, bool is_statement_timeout)
10131013

10141014
/* If we reach here, okay to set the timer interrupt */
10151015
#ifndef __BEOS__
1016-
MemSet(&timeval, 0, sizeof(struct itimerval));
1016+
MemSet((void *)&timeval, 0, sizeof(struct itimerval));
10171017
timeval.it_value.tv_sec = delayms / 1000;
10181018
timeval.it_value.tv_usec = (delayms % 1000) * 1000;
10191019
if (setitimer(ITIMER_REAL, &timeval, NULL))
@@ -1054,7 +1054,7 @@ disable_sig_alarm(bool is_statement_timeout)
10541054
#ifndef __BEOS__
10551055
struct itimerval timeval;
10561056

1057-
MemSet(&timeval, 0, sizeof(struct itimerval));
1057+
MemSet((void *)&timeval, 0, sizeof(struct itimerval));
10581058
if (setitimer(ITIMER_REAL, &timeval, NULL))
10591059
{
10601060
statement_timeout_active = deadlock_timeout_active = false;
@@ -1120,7 +1120,7 @@ CheckStatementTimeout(void)
11201120
#ifndef __BEOS__
11211121
struct itimerval timeval;
11221122

1123-
MemSet(&timeval, 0, sizeof(struct itimerval));
1123+
MemSet((void *)&timeval, 0, sizeof(struct itimerval));
11241124
timeval.it_value.tv_sec = statement_fin_time.tv_sec - now.tv_sec;
11251125
timeval.it_value.tv_usec = statement_fin_time.tv_usec - now.tv_usec;
11261126
if (timeval.it_value.tv_usec < 0)

src/bin/psql/command.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.103 2003/09/29 16:39:18 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.104 2003/10/11 16:30:55 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "command.h"
@@ -1280,7 +1280,7 @@ unescape(const unsigned char *source, size_t len)
12801280
case '7':
12811281
case '8':
12821282
case '9':
1283-
c = parse_char((char **) &p);
1283+
c = parse_char((void *) &p);
12841284
break;
12851285

12861286
default:

0 commit comments

Comments
 (0)