Attempt to fix compiler warning.
authorRobert Haas <rhaas@postgresql.org>
Mon, 15 May 2017 00:59:28 +0000 (20:59 -0400)
committerRobert Haas <rhaas@postgresql.org>
Mon, 15 May 2017 00:59:28 +0000 (20:59 -0400)
Per a report from Tom Lane, newer versions of gcc apparently think
that partexprs_item_saved can be used uninitialized.  Try to convince
them otherwise.

src/backend/catalog/partition.c

index 885c533280fdda540b1eeba8d260318b4cefa00e..832049c1ee579aae4cf7a72100a748609147429b 100644 (file)
@@ -1558,6 +1558,7 @@ get_qual_for_range(PartitionKey key, PartitionBoundSpec *spec)
     */
    i = 0;
    partexprs_item = list_head(key->partexprs);
+   partexprs_item_saved = partexprs_item;      /* placate compiler */
    forboth(cell1, spec->lowerdatums, cell2, spec->upperdatums)
    {
        EState     *estate;