Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ba8779

Browse files
author
Marina Polyakova
committed
Fix compiler warnings due to new checks in PostgreSQL 16
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) | ~~~~~~~~^~~~
1 parent74f6c16 commit5ba8779

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

‎pg_query_state.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -612,17 +612,18 @@ pg_query_state(PG_FUNCTION_ARGS)
612612
foreach(i,msgs)
613613
{
614614
List*qs_stack;
615-
shm_mq_msg*msg= (shm_mq_msg*)lfirst(i);
615+
shm_mq_msg*current_msg= (shm_mq_msg*)lfirst(i);
616616
proc_state*p_state= (proc_state*)palloc(sizeof(proc_state));
617617

618-
if (msg->result_code!=QS_RETURNED)
618+
if (current_msg->result_code!=QS_RETURNED)
619619
continue;
620620

621-
AssertState(msg->result_code==QS_RETURNED);
621+
AssertState(current_msg->result_code==QS_RETURNED);
622622

623-
qs_stack=deserialize_stack(msg->stack,msg->stack_depth);
623+
qs_stack=deserialize_stack(current_msg->stack,
624+
current_msg->stack_depth);
624625

625-
p_state->proc=msg->proc;
626+
p_state->proc=current_msg->proc;
626627
p_state->stack=qs_stack;
627628
p_state->frame_index=0;
628629
p_state->frame_cursor=list_head(qs_stack);
@@ -943,10 +944,10 @@ GetRemoteBackendWorkers(PGPROC *proc)
943944
for (i=0;i<msg->number;i++)
944945
{
945946
pid_tpid=msg->pids[i];
946-
PGPROC*proc=BackendPidGetProc(pid);
947-
if (!proc|| !proc->pid)
947+
PGPROC*current_proc=BackendPidGetProc(pid);
948+
if (!current_proc|| !current_proc->pid)
948949
continue;
949-
result=lcons(proc,result);
950+
result=lcons(current_proc,result);
950951
}
951952

952953
#ifPG_VERSION_NUM<100000

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp