From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CbM5Gi25MWlMQRkAWB0awg (envelope-from ) for ; Thu, 04 Dec 2025 11:39:09 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NYN7aMEy; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6793B1E08D; Thu, 04 Dec 2025 11:39:09 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no autolearn_force=no version=4.0.1 Received: from sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 262F71E08D for ; Thu, 04 Dec 2025 11:39:09 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 996274B1A36D for ; Thu, 4 Dec 2025 16:39:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 996274B1A36D 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=NYN7aMEy Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 93E444B1A375 for ; Thu, 4 Dec 2025 16:38:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 93E444B1A375 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 93E444B1A375 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764866306; cv=none; b=OPWVr+MxR05qkyLEplcjf36Gmp3UK7T9ZHeHIJLCiH59VLhNAa1gtp+HuSouSAkeFLAdFK1fJwClzIpt1kx9AkOTfOzfmtQtgXcYxCTf0RtfZ6b0D7qitgQJulsSmYhA7gceqJ5pTr3xgNzVgPfmw4j3ju49qRHF9atkS9DJVqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1764866306; c=relaxed/simple; bh=f3AdJspL/vptXxuH6JRrjen37hSJRu3jqJPr3VA7120=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Z9mPdR6kd9sUD7nQUcX4d9E0GlE8vP00c14/WVq8TM0h4hGawLT7MEgtrdUp65Wyl+NuJEJssugefTShaWNvz9Eq2WYrtWuU6F3w70SagBH7Oez/GMuyeSOXVWEOZR+KTjmTq4l3A6qKGXZ1M7URUGJP1OaaDM/D414WWbGyJOc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93E444B1A375 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1764866306; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=zvPNrltanyD4huUmsxFiT0kxxzJu/u1qwrcc5CUfciA=; b=NYN7aMEy71oZyc3bZelMQgQsKRwxWarCXIBAWSK1lZ4lf9OLJfGHtIuVb86LF/dSJM78x/ NZR2/05Z+8b1u6jGSskVwIX+7dIC4WWgG4YzhAgoXU3WiFHIOrM1/vQqWpzind0brNO9Wd Dv3KMuLzUPuIMbzfto34vyydEP7Sd7Q= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-349-fkiBo9baO2yllvGJ0WghzA-1; Thu, 04 Dec 2025 11:38:25 -0500 X-MC-Unique: fkiBo9baO2yllvGJ0WghzA-1 X-Mimecast-MFC-AGG-ID: fkiBo9baO2yllvGJ0WghzA_1764866304 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-42b3b5ed793so727123f8f.2 for ; Thu, 04 Dec 2025 08:38:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764866303; x=1765471103; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zvPNrltanyD4huUmsxFiT0kxxzJu/u1qwrcc5CUfciA=; b=pQjohnb0BC/VZWY7uv9aMJptLMw9eAsV+jiw5KM7XtbSuKQ1skZjO4oZ8L9Mcnth+Z 3emDLgBfEzO7CiFrb+LnhJ+yaDBr0jbQqgVDk1HNd81jXDUpKJhLV8z6KVyrO9PiOdVk +f48RWg1QiMgBX3sJYTI8RyB4ZT9JXIsy6rNB1t6dijXZJVloI5lJkG9l6vFCybGzHoz pEU1aRz8afmcxrqbUu6Y6Qfyc3m5/hZiDy7coLDVybR8q5xIf7zQsTyiWoKJSLtw+zgG T2XVpcu4KOIyRGDv19nH78Qb47p69WIwuyFTK6e1iv6fu0lDFKQAXGnJQ2PK85v4SXlk l7bg== X-Gm-Message-State: AOJu0Yw4zq2gdl3xg12n2EuBCOg2pjYl87uwfgmRN53WNbJLTFKE1/PX R5SJeVlbsAtaUWVH6SqQvhdzVms+nyIyqJshVP4ESi2gwpOHjG5yimHvRu9gf3XZ+EyjUF5Ro06 y0wnc3stRrLCBf6EafkRePtDi5dLH4+uFHRtsEDXa2L1JwFiiLB9A2uPnEOEKl0vHH8HhIYG5Ls 07KStTvfZSKek8wMMKAXYfB1vD6/5nEJhQOtuPdylVBOWeOFE= X-Gm-Gg: ASbGncuGWtE6BO4GygRMY5JY0LT4NoSfjwcdD52nZ59qIC0zbzEGC/ybq6OH6pKOckM n5/7eJ9HU4Ucn3Dzez3oeLUnQe3q45WaoOImIxFhU+GoBO4l0X7kMxxJpLBH8gSeF9NMk38wf3c QasCIbmVGAfCVenBmAQlXllIGclfz1cNixYZHTGBHU9fxoFpGSkkIoecdWC143d3HYO6xautOWw 9+css8HVqxWs5DsWQ/n0giBUfPKr0aMuvrUKJg7rXRgs09Wh6yQbMU8hsN5rGtoJj18UTyIcUSw pCizgphVPPtX7JOe4VHhbJAXoJcOsyOIzSf0Ew6DS8L2ZrdEbVjWe0OIUCHQ5gs+HIhb2yeerVW Q+bDG X-Received: by 2002:a05:6000:144d:b0:42b:39ee:2858 with SMTP id ffacd0b85a97d-42f731c2bb5mr6851042f8f.42.1764866303226; Thu, 04 Dec 2025 08:38:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHq6M9Xtyl+2uyFy9SD5F1OIXA0BJMccqKPCNFf3bnjgN2+u9loyrrWK166rgoQkaYxvbmGPA== X-Received: by 2002:a05:6000:144d:b0:42b:39ee:2858 with SMTP id ffacd0b85a97d-42f731c2bb5mr6851011f8f.42.1764866302738; Thu, 04 Dec 2025 08:38:22 -0800 (PST) Received: from localhost ([31.111.84.207]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42f7d330b20sm3905929f8f.29.2025.12.04.08.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Dec 2025 08:38:22 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Guinevere Larsen , Andrew Burgess Subject: [PATCH 1/4] gdb: remove some unnecessary code from print_gdb_hints Date: Thu, 4 Dec 2025 16:38:14 +0000 Message-ID: <93ed8d79f824668677c77ab2f477b621b843be53.1764866150.git.aburgess@redhat.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 90WLJ1rf1S6H2Oyfjzg8AaQ1ZslfdStPzvOMXjVfH1g_1764866304 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org I noticed some code in print_gdb_hints that is unused. There's a std::string that is never used, and a 'return' that is unnecessary, we can just drop out of the 'if' block and return at the end of the function. There should be no user visible changes after this commit. --- gdb/top.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/gdb/top.c b/gdb/top.c index 0798fea7a3b..27ea3d95aec 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1444,11 +1444,8 @@ print_gdb_hints (struct ui_file *stream) lines, but URLs can't. */ if (width - 3 <= docs_url.length ()) { - std::string sep (width, '-'); for (string_file &msg : styled_msg) gdb_printf (stream, "%s\n", msg.c_str ()); - - return; } else { -- 2.47.1