pgpool2.git / summary / log / commit / refs
commit 54bf03e83e550ea1b31728690d48e057b5cae11e
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Sat Mar 30 01:33:58 2019 +0000
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
[parent: 803395835a44]