Re: Unused parameters & co in code

2019-02-25 Thread Michael Paquier
On Thu, Jan 31, 2019 at 03:47:59PM +0900, Michael Paquier wrote: > - 0001 cleans up port in SendAuthRequest. This one is disappointing, > so I am fine to discard it. > - 0002 works on _bt_relbuf, whose callers don't actually benefit from > the cleanup as the relation worked on is always used for d

Re: Unused parameters & co in code

2019-01-31 Thread Antonin Houska
Michael Paquier wrote: > Hi all, > > I just got a run with CFLAGS with the following options: > -Wunused-function -Wunused-variable -Wunused-const-variable > -Wno-unused-result -Wunused-parameter -Wunused-macros > > And while this generates a lot of noise for callbacks and depending on > the e

Re: Unused parameters & co in code

2019-01-30 Thread Michael Paquier
On Wed, Jan 30, 2019 at 08:14:05AM -0300, Alvaro Herrera wrote: > On 2019-Jan-30, Michael Paquier wrote: >> ReindexPartitionedIndex => parentIdx > > I'd not change this one, as we will surely want to do something useful > eventually. Not that it matters, but it'd be useless churn. A lot of these

Re: Unused parameters & co in code

2019-01-30 Thread Michael Paquier
On Wed, Jan 30, 2019 at 12:33:47PM +0100, Peter Eisentraut wrote: > On 30/01/2019 08:33, Michael Paquier wrote: >> I just got a run with CFLAGS with the following options: >> -Wunused-function -Wunused-variable -Wunused-const-variable > > These are part of -Wall. The ones selected already generat

Re: Unused parameters & co in code

2019-01-30 Thread Michael Paquier
On Wed, Jan 30, 2019 at 09:41:04AM -0500, Tom Lane wrote: > I'd definitely take this on a case-by-case basis. In the planner > functions you mentioned, for instance, I'd be pretty hesitant to remove > the "root" parameter even if it happens not to be needed today. > We'd probably just end up putti

Re: Unused parameters & co in code

2019-01-30 Thread Tom Lane
Michael Paquier writes: > ... while this generates a lot of noise for callbacks and depending on > the environment used, this is also pointing to things which could be > simplified: I'd definitely take this on a case-by-case basis. In the planner functions you mentioned, for instance, I'd be pre

Re: Unused parameters & co in code

2019-01-30 Thread Alvaro Herrera
On 2019-Jan-30, Michael Paquier wrote: > ReindexPartitionedIndex => parentIdx I'd not change this one, as we will surely want to do something useful eventually. Not that it matters, but it'd be useless churn. > blackholeNoticeProcessor => arg This one's signature is enforced by PQsetNoticeProc

Re: Unused parameters & co in code

2019-01-30 Thread Peter Eisentraut
On 30/01/2019 08:33, Michael Paquier wrote: > I just got a run with CFLAGS with the following options: > -Wunused-function -Wunused-variable -Wunused-const-variable These are part of -Wall. > -Wno-unused-result What is the purpose of this? > -Wunused-parameter I think it's worth cleaning this

Unused parameters & co in code

2019-01-29 Thread Michael Paquier
Hi all, I just got a run with CFLAGS with the following options: -Wunused-function -Wunused-variable -Wunused-const-variable -Wno-unused-result -Wunused-parameter -Wunused-macros And while this generates a lot of noise for callbacks and depending on the environment used, this is also pointing to