From 54bf03e83e550ea1b31728690d48e057b5cae11e Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Sat, 30 Mar 2019 10:33:58 +0900 Subject: [PATCH] Fix wrong usage of volatile declaration. From a PostgreSQL commit message: Variables used after a longjmp() need to be declared volatile. In case of a pointer, it's the pointer itself that needs to be declared volatile, not the pointed-to value. Same thing can be said to: volatile StartupPacket *sp; This should have been: StartupPacket *volatile sp; This also suppresses a compiler warning. --- src/protocol/child.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol/child.c b/src/protocol/child.c index 75a2545b5..84b1462f4 100644 --- a/src/protocol/child.c +++ b/src/protocol/child.c @@ -2112,7 +2112,7 @@ validate_backend_connectivity(int front_end_fd) if (front_end_fd > 0) { POOL_CONNECTION *cp; - volatile StartupPacket *sp; + StartupPacket *volatile sp; /* * we do not want to report socket error, as above errors will be -- 2.39.5