Re: Fixing warnings in back branches?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fixing warnings in back branches?
Date: 2015-12-15 16:04:07
Message-ID: CA+TgmoaLcVhkN3j1bmjp8+=A2JQyfEwWGwrPwxd8qLJB4f9r9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 15, 2015 at 9:17 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2015-12-15 09:09:39 -0500, Tom Lane wrote:
>> In the end, if you're building an old branch, you should be doing it with
>> old tools.
>
> That I don't buy for even one second. Old branches are used in up2date
> environments in production. Absolutely regularly. apt.pg.o, yum.pg.o et
> al do provide them for that.

Really? I'm kind of with Tom; I don't expect that keeping old
branches warning-free on new compilers is really workable. I think
the situation today is actually better than it was a few years ago, at
least for me. I get some warnings on older branches, but with other
toolchains I've used for PG hacking at other times, it was much worse.
I think that it might be worth back-patching some of the warning fixes
we've done would be a good idea. Like this one:

- if (!res || !res->cmdStatus || strncmp(res->cmdStatus, "INSERT
", 7) != 0)
+ if (!res || strncmp(res->cmdStatus, "INSERT ", 7) != 0)
return "";

I really don't see how back-patching that can hurt anything, and it
gets rid of a warning, so great. But not all cases are going to be so
clear cut, and getting all supported back-branches to compile warning
free on every contributor's current toolchain sounds like a treadmill
I don't want to get on.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-12-15 16:08:29 Re: mdnblocks() sabotages error checking in _mdfd_getseg()
Previous Message Robert Haas 2015-12-15 15:53:58 Re: mdnblocks() sabotages error checking in _mdfd_getseg()