On Sun, Mar 17, 2024 at 01:51:39PM +0100, Peter Eisentraut wrote: > I have committed this patch series. Thanks.
My compiler is worried that "newtarget" might be getting used uninitialized. AFAICT there's no actual risk here, so I think initializing it to 0 is sufficient. I'll commit the attached patch shortly. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
diff --git a/src/backend/commands/statscmds.c b/src/backend/commands/statscmds.c index 5f49479832..1db3ef69d2 100644 --- a/src/backend/commands/statscmds.c +++ b/src/backend/commands/statscmds.c @@ -606,7 +606,7 @@ AlterStatistics(AlterStatsStmt *stmt) bool repl_null[Natts_pg_statistic_ext]; bool repl_repl[Natts_pg_statistic_ext]; ObjectAddress address; - int newtarget; + int newtarget = 0; bool newtarget_default; /* -1 was used in previous versions for the default setting */ diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index ae6719329e..3ed0618b4e 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8711,7 +8711,7 @@ ATExecDropExpression(Relation rel, const char *colName, bool missing_ok, LOCKMOD static ObjectAddress ATExecSetStatistics(Relation rel, const char *colName, int16 colNum, Node *newValue, LOCKMODE lockmode) { - int newtarget; + int newtarget = 0; bool newtarget_default; Relation attrelation; HeapTuple tuple,