From: Andrew Gierth Date: Mon, 3 Apr 2017 22:30:24 +0000 (+0100) Subject: Try and silence spurious Coverity warning. X-Git-Tag: REL_10_BETA1~407 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5780935266bd72951c770396f9267366414d1b9;p=postgresql Try and silence spurious Coverity warning. gset_data (aka gd) in planner.c is always non-null if and only if parse->groupingSets is non-null, but Coverity doesn't know that and complains. Feed it an assertion to see if that keeps it happy. --- diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index f99257b599..9d1a98220a 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -3362,6 +3362,8 @@ get_number_of_groups(PlannerInfo *root, ListCell *lc; ListCell *lc2; + Assert(gd); /* keep Coverity happy */ + dNumGroups = 0; foreach(lc, gd->rollups)