From patchwork Thu Jun 19 20:29:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 1579 Received: (qmail 684 invoked by alias); 19 Jun 2014 21:27:26 -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 673 invoked by uid 89); 19 Jun 2014 21:27:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 19 Jun 2014 21:27:23 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5JKTsNI021045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 19 Jun 2014 16:29:54 -0400 Received: from barimba.redhat.com (ovpn-113-103.phx2.redhat.com [10.3.113.103]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5JKTonZ004581; Thu, 19 Jun 2014 16:29:53 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 4/4] constify error_no_arg Date: Thu, 19 Jun 2014 14:29:48 -0600 Message-Id: <1403209788-1015-5-git-send-email-tromey@redhat.com> In-Reply-To: <1403209788-1015-1-git-send-email-tromey@redhat.com> References: <1403209788-1015-1-git-send-email-tromey@redhat.com> This is a trivial patch to make error_no_arg take a const argument. 2014-06-19 Tom Tromey * cli/cli-cmds.c (error_no_arg): Make "why" const. * command.h (error_no_arg): Update. --- gdb/ChangeLog | 5 +++++ gdb/cli/cli-cmds.c | 2 +- gdb/command.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index a4f52f8..2e08a5c 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -204,7 +204,7 @@ static const char *script_ext_mode = script_ext_soft; none is supplied. */ void -error_no_arg (char *why) +error_no_arg (const char *why) { error (_("Argument required (%s)."), why); } diff --git a/gdb/command.h b/gdb/command.h index a5040a4..bc9728f 100644 --- a/gdb/command.h +++ b/gdb/command.h @@ -378,7 +378,7 @@ extern void cmd_show_list (struct cmd_list_element *, int, char *); /* Used everywhere whenever at least one parameter is required and none is specified. */ -extern void error_no_arg (char *) ATTRIBUTE_NORETURN; +extern void error_no_arg (const char *) ATTRIBUTE_NORETURN; extern void dont_repeat (void);