Re: compile warning in CVS HEAD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: compile warning in CVS HEAD
Date: 2004-03-18 20:29:25
Message-ID: 11932.1079641765@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Neil Conway <neilc(at)samurai(dot)com> writes:
> I get the following warning compiling CVS HEAD:
> [neilc:/Users/neilc/pgsql]% make -C src/backend/utils/error all
> [ ... ]
> gcc -no-cpp-precomp -O0 -Winline -fno-strict-aliasing -g -Wall
> -Wmissing-prototypes -Wmissing-declarations -I../../../../src/include
> -I/sw/include -c -o elog.o elog.c -MMD
> elog.c: In function `log_line_prefix':
> elog.c:1123: warning: passing arg 1 of `localtime' from incompatible
> pointer type

Hm, looks like this code incorrectly assumes that the tv_sec field of
struct timeval is necessarily the same datatype as time_t. I'd suggest
assigning session_start into a local time_t variable.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-03-18 20:34:21 Re: [HACKERS] fsync method checking
Previous Message Kurt Roeckx 2004-03-18 20:26:21 Re: [HACKERS] fsync method checking

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-03-18 20:43:47 Re: compile warning in CVS HEAD
Previous Message Neil Conway 2004-03-18 20:06:21 compile warning in CVS HEAD