Re: Fixing warnings in back branches? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Fixing warnings in back branches?
Date
Msg-id CA+TgmoaLcVhkN3j1bmjp8+=A2JQyfEwWGwrPwxd8qLJB4f9r9A@mail.gmail.com
Whole thread Raw
In response to Re: Fixing warnings in back branches?  (Andres Freund <andres@anarazel.de>)
Responses Re: Fixing warnings in back branches?  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Tue, Dec 15, 2015 at 9:17 AM, Andres Freund <andres@anarazel.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: mdnblocks() sabotages error checking in _mdfd_getseg()
Next
From: Andres Freund
Date:
Subject: Re: mdnblocks() sabotages error checking in _mdfd_getseg()