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

From Peter Eisentraut
Subject Re: Fix -Wshadow=local warnings
Date
Msg-id a75a6d38-ea88-4459-ad83-e7425aa03c9a@eisentraut.org
Whole thread
Responses Re: Fix -Wshadow=local warnings
List pgsql-hackers
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
maybeit 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.

Attachment

pgsql-hackers by date:

Previous
From: Henri GASC
Date:
Subject: Re: [SQL/PGQ] Native executor for Graph query
Next
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition