ossc-db / pg_hint_plan

Extension adding support for optimizer hints in PostgreSQL
Other
696 stars 103 forks source link

Fix two warnings produced by -Wshadow=compatible-local #108

Closed michaelpq closed 1 year ago

michaelpq commented 1 year ago

Upstream PostgreSQL has added this switch to the standard compilation flags as of 0fe954c, hence trying to compile pg_hint_plan with upstream from this commit would cause those warnings. These are fixed by renaming the existing variables shadowing the others.

michaelpq commented 1 year ago

Thanks, applied as of 818fe9a.

rjuju commented 1 year ago

Any reason not to backpatch this (at least the chunk that existed in older branches), and 005264a4bd1d069160c6df49c233d7f26a2c2f8e too? I agree that -Wshadow=compatible-local was only added recently but keeping backbranches in sync will help further backpatching in general.

michaelpq commented 1 year ago

Any reason not to backpatch this (at least the chunk that existed in older branches), and 005264a too? I agree that -Wshadow=compatible-local was only added recently but keeping backbranches in sync will help further backpatching in general.

Sure. I can do that to ease back-patching.

michaelpq commented 1 year ago

Sure. I can do that to ease back-patching.

This has applied down to 11, and done.