From: David Malcolm Date: Thu, 14 Sep 2023 20:28:45 +0000 (-0400) Subject: analyzer: fix missing return in compatible_epath_p X-Git-Tag: basepoints/gcc-15~6134 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=59f6185b59f71175bb2bf7f380a2a6ec706ee8c9;p=thirdparty%2Fgcc.git 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 --git a/gcc/analyzer/diagnostic-manager.cc b/gcc/analyzer/diagnostic-manager.cc index a010f4ba1e1d..b3da2a982f2f 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; }