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

Commitd51368d

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 youuse -O2Andrew Dunstan
1 parent386e0f9 commitd51368d

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

‎src/backend/commands/tablecmds.c

Lines changed: 2 additions & 2 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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
returnNULL;/* segment belongs to a non-Postgres app */
370370
}
371371

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

Lines changed: 4 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/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(structitimerval));
1016+
MemSet((void*)&timeval,0,sizeof(structitimerval));
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
structitimervaltimeval;
10561056

1057-
MemSet(&timeval,0,sizeof(structitimerval));
1057+
MemSet((void*)&timeval,0,sizeof(structitimerval));
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
structitimervaltimeval;
11221122

1123-
MemSet(&timeval,0,sizeof(structitimerval));
1123+
MemSet((void*)&timeval,0,sizeof(structitimerval));
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

Lines changed: 2 additions & 2 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp