Thread: pgsql: Silence compiler warning about pointer type mismatch on some pla
pgsql: Silence compiler warning about pointer type mismatch on some pla
From
Heikki Linnakangas
Date:
Silence compiler warning about pointer type mismatch on some platforms. timeval.t_sec is of type time_t, which is not always compatible with long. I'm not sure if this was just harmless warning or a real bug, but this fixes it, anyway. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/2a4bbed7b80283200216244e98f7f004ad4d735a Modified Files -------------- src/bin/pg_basebackup/receivelog.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
On Tue, Oct 2, 2012 at 11:47 PM, Heikki Linnakangas <heikki.linnakangas@iki.fi> wrote: > Silence compiler warning about pointer type mismatch on some platforms. > > timeval.t_sec is of type time_t, which is not always compatible with long. > I'm not sure if this was just harmless warning or a real bug, but this > fixes it, anyway. + timeout.tv_sec = usecs; This code looks like a bug. No? I think the attached patch should be applied. Regards, -- Fujii Masao
Attachment
Re: pgsql: Silence compiler warning about pointer type mismatch on some pla
From
Heikki Linnakangas
Date:
On 02.10.2012 19:33, Fujii Masao wrote: > On Tue, Oct 2, 2012 at 11:47 PM, Heikki Linnakangas > <heikki.linnakangas@iki.fi> wrote: >> Silence compiler warning about pointer type mismatch on some platforms. >> >> timeval.t_sec is of type time_t, which is not always compatible with long. >> I'm not sure if this was just harmless warning or a real bug, but this >> fixes it, anyway. > > + timeout.tv_sec = usecs; > > This code looks like a bug. No? I think the attached patch should be applied. Sigh, yes. Thanks for paying more attention than me.. - Heikki