Remove initialization from PendingBackendStats
authorMichael Paquier <michael@paquier.xyz>
Wed, 12 Mar 2025 11:37:43 +0000 (20:37 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 12 Mar 2025 11:37:43 +0000 (20:37 +0900)
9a8dd2c5a6d has added an initialization to PendingBackendStats, which
has been causing compilation warnings in the buildfarm.  This code does
not strictly require it as PendingBackendStats is always initialized
with memset(0), so let's remove it.

Per report from multiple buildfarm members, like ayu and batfish, via
Tom Lane.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/1870853.1741749264@sss.pgh.pa.us

src/backend/utils/activity/pgstat_backend.c

index da4c7edd772cd5d916dce266621ebc87ad49c4d9..a8cb54a77325bd9217620ce7a3e68d00f0f3a109 100644 (file)
@@ -36,7 +36,7 @@
  * reported within critical sections so we use static memory in order to avoid
  * memory allocation.
  */
-static PgStat_BackendPending PendingBackendStats = {0};
+static PgStat_BackendPending PendingBackendStats;
 
 /*
  * WAL usage counters saved from pgWalUsage at the previous call to