Re: Fix -Wshadow=local warnings - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Fix -Wshadow=local warnings
Date
Msg-id 566b149d-a7a1-46ce-9944-b2cf84cbf066@eisentraut.org
Whole thread
In response to Re: Fix -Wshadow=local warnings  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
On 17.09.26 11:29, Peter Eisentraut wrote:
> On 02.09.26 07:19, Chao Li wrote:
>> A few small comments:
>>
>> 1 - 0001 - dependencies.c
>> ```
>>    * expression into *expr.
>>    */
>>   static bool
>> -dependency_is_compatible_expression(Node *clause, Index relid, List 
>> *statlist, Node **expr)
>> +dependency_is_compatible_expression(Node *clause, Index relid, List 
>> *statlist, Node **stat_expr_p)
>> ```
>>
>> As “expr” is renamed, the function header comment needs to be updated 
>> as well.
>>
>> 2 - 0001 - pg_constraint.c
>> ```
>> +            CookedConstraint *cooked_constr;
>> ```
>>
>> In the current RelationGetNotNullConstraints(), other local variables 
>> use camelCase naming, for example constrRel, so maybe it would be 
>> better to keep the naming style consistent.
> 
> Thanks, the patch with the code changes has been committed, with your 
> suggestions incorporated.
> 
> The patch to activate the option couldn't be committed yet because the 
> workaround for the LLVM headers didn't work and had to be reverted 
> (commit 7a0aa99e51c).  I have worked on a new solution that works more 
> along the lines of how other per-file or per-module "-Wno-..." options 
> are handled.  I think this will be simpler and less fragile.  See 
> attached patch.

This has been committed, and the buildfarm seems to be quiet about it so 
far.




pgsql-hackers by date:

Previous
From: shihao zhong
Date:
Subject: Re: [PATCH] Refactor remaining zero-fill relation extensions to use smgrzeroextend()
Next
From: kedar anavardekar
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication