Re: log_heap_visible(): remove unused parameter and update comment - Mailing list pgsql-hackers

From Japin Li
Subject Re: log_heap_visible(): remove unused parameter and update comment
Date
Msg-id MEYP282MB1669DA5AE4A3EAA8151BA8CBB6569@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: log_heap_visible(): remove unused parameter and update comment  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: log_heap_visible(): remove unused parameter and update comment
List pgsql-hackers
On Fri, 30 Sep 2022 at 22:09, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
> On Fri, Sep 30, 2022 at 7:30 PM Japin Li <japinli@hotmail.com> 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 it may be. But if the parameter is of type
> unrelated to the context of the function, like the one committed
> 65b158ae4e892c2da7a5e31e2d2645e5e79a0bfd and like the proposed patch
> to some extent, it could be removed.
>
> Others may have different thoughts here.

Maybe we can define a macro like UNUSED(x) for those parameters, and
call this macro on the parameter that we might be useful, then
we can use -Wunused-parameter when compiling.  Any thoughts?

-- 
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: log_heap_visible(): remove unused parameter and update comment
Next
From: Andrey Chudnovsky
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER