1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

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
This commit is contained in:
Bruce Momjian
2003-10-11 16:30:55 +00:00
parent 386e0f9046
commit d51368dbbd
5 changed files with 13 additions and 13 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.133 2003/08/04 02:40:03 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.134 2003/10/11 16:30:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1013,7 +1013,7 @@ enable_sig_alarm(int delayms, bool is_statement_timeout)
/* If we reach here, okay to set the timer interrupt */
#ifndef __BEOS__
MemSet(&timeval, 0, sizeof(struct itimerval));
MemSet((void *)&timeval, 0, sizeof(struct itimerval));
timeval.it_value.tv_sec = delayms / 1000;
timeval.it_value.tv_usec = (delayms % 1000) * 1000;
if (setitimer(ITIMER_REAL, &timeval, NULL))
@ -1054,7 +1054,7 @@ disable_sig_alarm(bool is_statement_timeout)
#ifndef __BEOS__
struct itimerval timeval;
MemSet(&timeval, 0, sizeof(struct itimerval));
MemSet((void *)&timeval, 0, sizeof(struct itimerval));
if (setitimer(ITIMER_REAL, &timeval, NULL))
{
statement_timeout_active = deadlock_timeout_active = false;
@ -1120,7 +1120,7 @@ CheckStatementTimeout(void)
#ifndef __BEOS__
struct itimerval timeval;
MemSet(&timeval, 0, sizeof(struct itimerval));
MemSet((void *)&timeval, 0, sizeof(struct itimerval));
timeval.it_value.tv_sec = statement_fin_time.tv_sec - now.tv_sec;
timeval.it_value.tv_usec = statement_fin_time.tv_usec - now.tv_usec;
if (timeval.it_value.tv_usec < 0)