From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2209) id 12C5638582BC; Thu, 14 Sep 2023 20:29:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12C5638582BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694723346; bh=i6CIeSK04sdNpeIkEB1EswAeT9rXsCqxJGkTEo5w+Ko=; h=From:To:Subject:Date:From; b=MsiEi2/vvpxuCTqZJGVjy92c4EPQTdcYHWbsPgz1dlrTECFHqkz03khk+a5fbLRi6 wpqFn6PRqBnoFOTQHB3L43/Xzhvpk1EkZ+t3KIlf6iilupizemFV9Kd7DKrTXdiUpQ D27r9wdz+/nKn0RpNmZQksR/tdxlFJNEmmnNgqFA= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: David Malcolm To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-4005] analyzer: fix missing return in compatible_epath_p X-Act-Checkin: gcc X-Git-Author: David Malcolm X-Git-Refname: refs/heads/master X-Git-Oldrev: 8878f7ab1cb9ed61a7039aab21d527435570ec2a X-Git-Newrev: 59f6185b59f71175bb2bf7f380a2a6ec706ee8c9 Message-Id: <20230914202906.12C5638582BC@sourceware.org> Date: Thu, 14 Sep 2023 20:29:06 +0000 (GMT) List-Id: https://gcc.gnu.org/g:59f6185b59f71175bb2bf7f380a2a6ec706ee8c9 commit r14-4005-g59f6185b59f71175bb2bf7f380a2a6ec706ee8c9 Author: David Malcolm Date: Thu Sep 14 16:28:45 2023 -0400 analyzer: fix missing return in compatible_epath_p gcc/analyzer/ChangeLog: * diagnostic-manager.cc (compatible_epath_p): Fix missing return. Signed-off-by: David Malcolm Diff: --- gcc/analyzer/diagnostic-manager.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc/analyzer/diagnostic-manager.cc b/gcc/analyzer/diagnostic-manager.cc index a010f4ba1e1..b3da2a982f2 100644 --- a/gcc/analyzer/diagnostic-manager.cc +++ b/gcc/analyzer/diagnostic-manager.cc @@ -966,6 +966,14 @@ compatible_epath_p (const exploded_path *lhs_path, /* A superedge was found for only one of the two paths. */ return false; } + + /* A superedge was found for only one of the two paths. */ + if (lhs_eedge_idx >= 0 || rhs_eedge_idx >= 0) + return false; + + /* Both paths were drained up entirely. + No discriminant was found. */ + return true; }