Initialize variables to placate compiler.

Since commit 012460ee93, 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
This commit is contained in:
Nathan Bossart 2024-03-17 20:16:15 -05:00
parent d6607016c7
commit 949300402b
2 changed files with 2 additions and 2 deletions

View File

@ -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 */

View File

@ -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,