Silence compiler warning.
authorTom Lane <[email protected]>
Tue, 18 Mar 2025 14:54:10 +0000 (10:54 -0400)
committerTom Lane <[email protected]>
Tue, 18 Mar 2025 14:54:10 +0000 (10:54 -0400)
Assorted buildfarm members are complaining about "'process_list' may
be used uninitialized in this function" since f76892c9f, presumably
because they don't trust that the switch case labels are exhaustive.
We can silence that by initializing the variable to NULL.  Should
a switch fall-through actually happen, we'll get SIGSEGV at the
first use, which is as good as an Assert.

src/bin/scripts/reindexdb.c

index 7f0fc6344e9ea7c6de39cd50055e91c371cf81c5..860a0fcb46bde4e0a22a51783a866c49dafdc425 100644 (file)
@@ -286,7 +286,7 @@ reindex_one_database(ConnParams *cparams, ReindexType type,
    SimpleStringListCell *cell;
    SimpleOidListCell *indices_tables_cell = NULL;
    bool        parallel = concurrentCons > 1;
-   SimpleStringList *process_list;
+   SimpleStringList *process_list = NULL;
    SimpleOidList *tableoid_list = NULL;
    ReindexType process_type = type;
    ParallelSlotArray *sa;