Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9493004

Browse files
Initialize variables to placate compiler.
Since commit 012460e, some compilers have been warning that a couple of variables may be used uninitialized. There doesn't appear to be any actual risk, so let's just initialize these variables to 0 to silence the compiler warnings. Discussion: https://postgr.es/m/20240317192927.GA3978212%40nathanxps13
1 parent d660701 commit 9493004

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/commands/statscmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ AlterStatistics(AlterStatsStmt *stmt)
606606
bool repl_null[Natts_pg_statistic_ext];
607607
bool repl_repl[Natts_pg_statistic_ext];
608608
ObjectAddress address;
609-
int newtarget;
609+
int newtarget = 0;
610610
bool newtarget_default;
611611

612612
/* -1 was used in previous versions for the default setting */

src/backend/commands/tablecmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8711,7 +8711,7 @@ ATExecDropExpression(Relation rel, const char *colName, bool missing_ok, LOCKMOD
87118711
static ObjectAddress
87128712
ATExecSetStatistics(Relation rel, const char *colName, int16 colNum, Node *newValue, LOCKMODE lockmode)
87138713
{
8714-
int newtarget;
8714+
int newtarget = 0;
87158715
bool newtarget_default;
87168716
Relation attrelation;
87178717
HeapTuple tuple,

0 commit comments

Comments
 (0)