Skip to content

Commit 506428d

Browse files
committed
Attempt to fix compiler warning on old compiler
A couple more like b449afb, per complaints from lapwing.
1 parent b449afb commit 506428d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

contrib/pg_prewarm/autoprewarm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,11 +814,12 @@ apw_detach_shmem(int code, Datum arg)
814814
static void
815815
apw_start_leader_worker(void)
816816
{
817-
BackgroundWorker worker = {0};
817+
BackgroundWorker worker;
818818
BackgroundWorkerHandle *handle;
819819
BgwHandleStatus status;
820820
pid_t pid;
821821

822+
MemSet(&worker, 0, sizeof(BackgroundWorker));
822823
worker.bgw_flags = BGWORKER_SHMEM_ACCESS;
823824
worker.bgw_start_time = BgWorkerStart_ConsistentState;
824825
strcpy(worker.bgw_library_name, "pg_prewarm");
@@ -855,9 +856,10 @@ apw_start_leader_worker(void)
855856
static void
856857
apw_start_database_worker(void)
857858
{
858-
BackgroundWorker worker = {0};
859+
BackgroundWorker worker;
859860
BackgroundWorkerHandle *handle;
860861

862+
MemSet(&worker, 0, sizeof(BackgroundWorker));
861863
worker.bgw_flags =
862864
BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION;
863865
worker.bgw_start_time = BgWorkerStart_ConsistentState;

contrib/postgres_fdw/postgres_fdw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3307,7 +3307,7 @@ estimate_path_cost_size(PlannerInfo *root,
33073307
{
33083308
RelOptInfo *outerrel = fpinfo->outerrel;
33093309
PgFdwRelationInfo *ofpinfo;
3310-
AggClauseCosts aggcosts = {0};
3310+
AggClauseCosts aggcosts;
33113311
double input_rows;
33123312
int numGroupCols;
33133313
double numGroups = 1;
@@ -3331,6 +3331,7 @@ estimate_path_cost_size(PlannerInfo *root,
33313331
input_rows = ofpinfo->rows;
33323332

33333333
/* Collect statistics about aggregates for estimating costs. */
3334+
MemSet(&aggcosts, 0, sizeof(AggClauseCosts));
33343335
if (root->parse->hasAggs)
33353336
{
33363337
get_agg_clause_costs(root, AGGSPLIT_SIMPLE, &aggcosts);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy