]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer: Fix up -Wunused-variable warning
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 May 2026 11:27:38 +0000 (13:27 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 5 May 2026 11:27:38 +0000 (13:27 +0200)
I've noticed a new
../../gcc/analyzer/kf.cc: In member function ‘virtual void ana::kf_strcasecmp::impl_call_post(const ana::call_details&) const’:
../../gcc/analyzer/kf.cc:2882:12: warning: unused variable ‘lhs_type’ [-Wunused-variable]
warning.
The following patch fixes that.

2026-05-05  Jakub Jelinek  <jakub@redhat.com>

* kf.cc (kf_strcasecmp::impl_call_post): Remove unused variable.

Reviewed-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/kf.cc

index d2605e9625298605d408799d1d136cfab3398265..a9f69d039877ad453279a50bb60df08fd46ed1ee 100644 (file)
@@ -2879,7 +2879,7 @@ public:
 void
 kf_strcasecmp::impl_call_post (const call_details &cd) const
 {
-  if (tree lhs_type = cd.get_lhs_type ())
+  if (cd.get_lhs_type ())
     {
       const svalue *result_val
        = cd.get_or_create_conjured_svalue (cd.get_lhs_region ());