Re: compile warning in CVS HEAD - Mailing list pgsql-hackers

From Tom Lane
Subject Re: compile warning in CVS HEAD
Date
Msg-id 11932.1079641765@sss.pgh.pa.us
Whole thread Raw
In response to compile warning in CVS HEAD  (Neil Conway <neilc@samurai.com>)
Responses Re: compile warning in CVS HEAD  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Neil Conway <neilc@samurai.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


pgsql-hackers by date:

Previous
From: Kurt Roeckx
Date:
Subject: Re: fsync method checking
Next
From: Bruce Momjian
Date:
Subject: Re: fsync method checking