Re: log_heap_visible(): remove unused parameter and update comment

2022-10-04 Thread Peter Eisentraut
On 04.10.22 09:19, Bharath Rupireddy wrote: We have the pg_attribute_unused() macro already. I'm not sure if adding -Wunused-parameter for compilation plus using pg_attribute_unused() for unused-yet-contextually-required variables is a great idea. But it has some merits as it avoids unused variab

Re: log_heap_visible(): remove unused parameter and update comment

2022-10-04 Thread Bharath Rupireddy
On Fri, Sep 30, 2022 at 7:48 PM Japin Li wrote: > > On Fri, 30 Sep 2022 at 22:09, Bharath Rupireddy > wrote: > > On Fri, Sep 30, 2022 at 7:30 PM Japin Li wrote: > >> > >> When I try to use -Wunused-parameter, I find there are many warnings :-( . > > > > Great! > > > > I think we can't just remo

Re: log_heap_visible(): remove unused parameter and update comment

2022-09-30 Thread Japin Li
On Fri, 30 Sep 2022 at 22:09, Bharath Rupireddy wrote: > On Fri, Sep 30, 2022 at 7:30 PM Japin Li wrote: >> >> When I try to use -Wunused-parameter, I find there are many warnings :-( . > > Great! > > I think we can't just remove every unused parameter, for instance, it > makes sense to retain

Re: log_heap_visible(): remove unused parameter and update comment

2022-09-30 Thread Bharath Rupireddy
On Fri, Sep 30, 2022 at 7:30 PM Japin Li wrote: > > When I try to use -Wunused-parameter, I find there are many warnings :-( . Great! I think we can't just remove every unused parameter, for instance, it makes sense to retain PlannerInfo *root parameter even though it's not used now, in future i

Re: log_heap_visible(): remove unused parameter and update comment

2022-09-30 Thread Japin Li
On Fri, 30 Sep 2022 at 19:32, Bharath Rupireddy wrote: > On Fri, Sep 30, 2022 at 1:07 PM Drouvot, Bertrand > wrote: >> >> Hi, >> >> While resuming the work on [1] I noticed that: >> >> - there is an unused parameter in log_heap_visible() >> - the comment associated to the function is not in "s

Re: log_heap_visible(): remove unused parameter and update comment

2022-09-30 Thread Drouvot, Bertrand
Hi, On 9/30/22 1:32 PM, Bharath Rupireddy wrote: On Fri, Sep 30, 2022 at 1:07 PM Drouvot, Bertrand wrote: Hi, While resuming the work on [1] I noticed that: - there is an unused parameter in log_heap_visible() - the comment associated to the function is not in "sync" with the current implem

Re: log_heap_visible(): remove unused parameter and update comment

2022-09-30 Thread Bharath Rupireddy
On Fri, Sep 30, 2022 at 1:07 PM Drouvot, Bertrand wrote: > > Hi, > > While resuming the work on [1] I noticed that: > > - there is an unused parameter in log_heap_visible() > - the comment associated to the function is not in "sync" with the > current implementation (referring a "block" that is no

log_heap_visible(): remove unused parameter and update comment

2022-09-30 Thread Drouvot, Bertrand
Hi, While resuming the work on [1] I noticed that: - there is an unused parameter in log_heap_visible() - the comment associated to the function is not in "sync" with the current implementation (referring a "block" that is not involved anymore) Attached a tiny patch as an attempt to address t