8000 Fix compiler warnings due to new checks in PostgreSQL 16 by MarinaPolyakova · Pull Request #43 · postgrespro/pg_query_state · GitHub
[go: up one dir, main page]

Skip to content

Fix compiler warnings due to new checks in PostgreSQL 16 #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

MarinaPolyakova
Copy link

See the commit 0fe954c28584169938e5c0738cfaa9930ce77577 (Add -Wshadow=compatible-local to the standard compilation flags) in PostgreSQL 16.

pg_query_state.c: In function ‘pg_query_state’:
pg_query_state.c:615:66: warning: declaration of ‘msg’ shadows a previous local [-Wshadow=compatible-local]
  615 |                                                 shm_mq_msg      *msg =
(shm_mq_msg *) lfirst(i);
      |                                                                  ^~~
pg_query_state.c:489:42: note: shadowed declaration is here
  489 |                 shm_mq_msg              *msg;
      |                                          ^~~
pg_query_state.c: In function ‘GetRemoteBackendWorkers’:
pg_query_state.c:946:25: warning: declaration of ‘proc’ shadows a parameter
[-Wshadow=compatible-local]
  946 |                 PGPROC *proc = BackendPidGetProc(pid);
      |                         ^~~~
pg_query_state.c:913:33: note: shadowed declaration is here
  913 | GetRemoteBackendWorkers(PGPROC *proc)
      |                         ~~~~~~~~^~~~

See the commit 0fe954c28584169938e5c0738cfaa9930ce77577 (Add
-Wshadow=compatible-local to the standard compilation flags) in PostgreSQL 16.

pg_query_state.c: In function ‘pg_query_state’:
pg_query_state.c:615:66: warning: declaration of ‘msg’ shadows a previous local
[-Wshadow=compatible-local]
  615 |                                                 shm_mq_msg      *msg =
(shm_mq_msg *) lfirst(i);
      |                                                                  ^~~
pg_query_state.c:489:42: note: shadowed declaration is here
  489 |                 shm_mq_msg              *msg;
      |                                          ^~~
pg_query_state.c: In function ‘GetRemoteBackendWorkers’:
pg_query_state.c:946:25: warning: declaration of ‘proc’ shadows a parameter
[-Wshadow=compatible-local]
  946 |                 PGPROC *proc = BackendPidGetProc(pid);
      |                         ^~~~
pg_query_state.c:913:33: note: shadowed declaration is here
  913 | GetRemoteBackendWorkers(PGPROC *proc)
      |                         ~~~~~~~~^~~~
@codecov
Copy link
codecov bot commented Nov 21, 2022

Codecov Report

Merging #43 (d3285d6) into master (74f6c16) will increase coverage by 0.51%.
The diff coverage is 57.14%.

❗ Current head d3285d6 differs from pull request most recent head 5ba8779. Consider uploading reports for the commit 5ba8779 to get more accurate results

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
+ Coverage   76.36%   76.88%   +0.51%     
==========================================
  Files           9        9              
  Lines         694      636      -58     
==========================================
- Hits          530      489      -41     
+ Misses        164      147      -17     
Impacted Files Coverage Δ
pg_query_state.c 75.21% <57.14%> (+0.77%) ⬆️
pg_bin/include/postgresql/server/port/atomics.h 72.72% <0.00%> (-6.59%) ⬇️
pg_bin/include/postgresql/server/utils/palloc.h 100.00% <0.00%> (ø)
pg_bin/include/postgresql/server/nodes/pg_list.h 100.00% <0.00%> (ø)
signal_handler.c 82.53% <0.00%> (+1.62%) ⬆️
...n/include/postgresql/server/port/atomics/generic.h 75.00% <0.00%> (+8.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sokolcati sokolcati merged commit 16db70c into master Nov 24, 2022
@sokolcati sokolcati deleted the PGPRO-7444 branch February 28, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0