From patchwork Thu Apr 11 19:01:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32263 Received: (qmail 37099 invoked by alias); 11 Apr 2019 19:01:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 37085 invoked by uid 89); 11 Apr 2019 19:01:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Envelope-From:sk:tromey@, H*F:U*tromey, noticed, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Apr 2019 19:01:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 4AE3656154; Thu, 11 Apr 2019 15:01:42 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ry4MtvZQ0VCm; Thu, 11 Apr 2019 15:01:42 -0400 (EDT) Received: from murgatroyd.Home (174-29-37-56.hlrn.qwest.net [174.29.37.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id E8D3356153; Thu, 11 Apr 2019 15:01:41 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Make "msg" const in internal_vproblem Date: Thu, 11 Apr 2019 13:01:38 -0600 Message-Id: <20190411190138.5335-1-tromey@adacore.com> MIME-Version: 1.0 I noticed that the "msg" variable in internal_vproblem could be "const". This seems like an improvement because it can wind up in rodata. Tested by rebuilding. gdb/ChangeLog 2019-04-11 Tom Tromey * utils.c (internal_vproblem): Make "msg" const. --- gdb/ChangeLog | 4 ++++ gdb/utils.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/utils.c b/gdb/utils.c index 840779a6307..700f54f9ad3 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -300,7 +300,7 @@ internal_vproblem (struct internal_problem *problem, /* Don't allow infinite error/warning recursion. */ { - static char msg[] = "Recursive internal problem.\n"; + static const char msg[] = "Recursive internal problem.\n"; switch (dejavu) {