From 736e7266b5a7e519052b7f20f308b70e9e9a98e4 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Wed, 24 Apr 2024 13:43:25 +0900 Subject: [PATCH] Silence gcc warning. Commit 0b94cd9f caused a gcc warning: streaming_replication/pool_worker_child.c: In function 'do_worker_child': streaming_replication/pool_worker_child.c:281:40: warning: 'watchdog_leader' may be used uninitialized in this function [-Wmaybe-uninitialized] if (!pool_config->use_watchdog || ^ It seems this only occures in older gcc (e.g. gcc 4.8.5). Backpatch-thtrough: master branch only as commit 0b94cd9f only applied to master. --- src/streaming_replication/pool_worker_child.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/streaming_replication/pool_worker_child.c b/src/streaming_replication/pool_worker_child.c index a9695fb83..c92cf6725 100644 --- a/src/streaming_replication/pool_worker_child.c +++ b/src/streaming_replication/pool_worker_child.c @@ -181,6 +181,7 @@ do_worker_child(void) /* * Get watchdog status if watchdog is enabled. */ + watchdog_leader = false; if (pool_config->use_watchdog) { WD_STATES wd_status; -- 2.39.5