| Message ID | afmqmmPODo9EOeMk@tucnak |
|---|---|
| State | New |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 49C884BA9010 for <patchwork@sourceware.org>; Tue, 5 May 2026 08:31:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 49C884BA9010 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DInVDigA X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 45DB34BA2E08 for <gcc-patches@gcc.gnu.org>; Tue, 5 May 2026 08:30:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 45DB34BA2E08 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 45DB34BA2E08 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777969827; cv=none; b=jmbLTtbxzsTN8nvQVifDfy1RjZ1ZkaLeepikSOg35TslyGpChu+/OjNBy4U2+8jedFi/zzxvMSnYeD8NUrPs7MJFxArZoOAtY/EEfmDrply81TOvOG4QK8LsyA1Gan0d8770tUWq4NcP8GRPSiSBlMH68iRWktVF7IwWR9+fuNc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777969827; c=relaxed/simple; bh=ukyyte9wn9Iaf//PTEM5FeOj4iDXlyMwtM+fa1X73bI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=pO94VWHrNC+we6tP3OAtiOA9jBRpx1RG2PKB6t0+ZrXe8hb2nAwbvtpOOv3i4TL6zF5BN/M8zq+OwnB497DVT7ewLIDXSs8SvL3wHVVDCLAS3R1Vq6NOLLAPc23bqj5wRwIM56qe1RrIdAw0xNBHrXHGLmjAmYPLg3QkodvZhFk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 45DB34BA2E08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777969827; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eT6A9MDNdBojB9+J2KqkXQ03cY5CflIBdcIt4EZ3vxc=; b=DInVDigAzbazLAx403pPElNaq91C/iQwUYZfpYD5+/G9FByKPq7ABZxvzM/hY6s1lja5YC 6eP4RHLaQlGEniZjKcfV5/ii4lN+AZzYzjsum1gx1HDUGSoP2ZLyL4vXMSMVzXj3l6MfRG yKlQzhU5p0N5rQ50aVVmaXLVqN+nudY= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-170-lEpGQSWoOouKBj353H3TeA-1; Tue, 05 May 2026 04:30:23 -0400 X-MC-Unique: lEpGQSWoOouKBj353H3TeA-1 X-Mimecast-MFC-AGG-ID: lEpGQSWoOouKBj353H3TeA_1777969822 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7477F195608F; Tue, 5 May 2026 08:30:22 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.44.32.15]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 083211944CED; Tue, 5 May 2026 08:30:21 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 6458UJCe1152098 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 5 May 2026 10:30:19 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 6458UJSF1152097; Tue, 5 May 2026 10:30:19 +0200 Date: Tue, 5 May 2026 10:30:18 +0200 From: Jakub Jelinek <jakub@redhat.com> To: David Malcolm <dmalcolm@redhat.com> Cc: gcc-patches@gcc.gnu.org, Virginia Kodsy <virginiahany9@gmail.com> Subject: [PATCH] analyzer: Fix up -Wunused-variable warning Message-ID: <afmqmmPODo9EOeMk@tucnak> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: HzVSDvR7DskBVLItNgqWtB_qcUTLi6VO8zJPlbVcJPE_1777969822 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Reply-To: Jakub Jelinek <jakub@redhat.com> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
analyzer: Fix up -Wunused-variable warning
|
|
Commit Message
Jakub Jelinek
May 5, 2026, 8:30 a.m. UTC
Hi! 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. Ok for trunk? 2026-05-05 Jakub Jelinek <jakub@redhat.com> * kf.cc (kf_strcasecmp::impl_call_post): Remove unused variable. Jakub
Comments
On Tue, 2026-05-05 at 10:30 +0200, Jakub Jelinek wrote: > Hi! > > 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. > > Ok for trunk? LGTM, thanks > > 2026-05-05 Jakub Jelinek <jakub@redhat.com> > > * kf.cc (kf_strcasecmp::impl_call_post): Remove unused > variable. > > --- gcc/analyzer/kf.cc.jj 2026-04-29 07:45:27.925267076 +0200 > +++ gcc/analyzer/kf.cc 2026-05-05 10:27:36.593531697 +0200 > @@ -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 ()); > > Jakub >
--- gcc/analyzer/kf.cc.jj 2026-04-29 07:45:27.925267076 +0200 +++ gcc/analyzer/kf.cc 2026-05-05 10:27:36.593531697 +0200 @@ -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 ());