From patchwork Fri May 17 16:22:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 32747 Received: (qmail 24905 invoked by alias); 17 May 2019 16:22:47 -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 24896 invoked by uid 89); 17 May 2019 16:22:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.7 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=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; Fri, 17 May 2019 16:22:46 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E48AF117E8B; Fri, 17 May 2019 12:22:44 -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 4PsSYXuzxQgb; Fri, 17 May 2019 12:22:44 -0400 (EDT) Received: from murgatroyd.Home (71-218-69-43.hlrn.qwest.net [71.218.69.43]) (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 90232117E6C; Fri, 17 May 2019 12:22:44 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI 1/2] Constify annotate_source Date: Fri, 17 May 2019 10:22:41 -0600 Message-Id: <20190517162242.27738-2-tromey@adacore.com> In-Reply-To: <20190517162242.27738-1-tromey@adacore.com> References: <20190517162242.27738-1-tromey@adacore.com> MIME-Version: 1.0 I noticed that annotate_source takes a "char *", but really should take a "const char *". This patch fixes this. gdb/ChangeLog 2019-05-17 Tom Tromey * annotate.c (annotate_source): Make "filename" const. * annotate.h (annotate_source): Use const. --- gdb/ChangeLog | 5 +++++ gdb/annotate.c | 2 +- gdb/annotate.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/annotate.c b/gdb/annotate.c index 97cb4c8855d..088f7c957df 100644 --- a/gdb/annotate.c +++ b/gdb/annotate.c @@ -419,7 +419,7 @@ annotate_arg_end (void) } void -annotate_source (char *filename, int line, int character, int mid, +annotate_source (const char *filename, int line, int character, int mid, struct gdbarch *gdbarch, CORE_ADDR pc) { if (annotation_level > 1) diff --git a/gdb/annotate.h b/gdb/annotate.h index 4a9e1b58f28..ff10d459465 100644 --- a/gdb/annotate.h +++ b/gdb/annotate.h @@ -87,7 +87,7 @@ struct annotate_arg_emitter DISABLE_COPY_AND_ASSIGN (annotate_arg_emitter); }; -extern void annotate_source (char *, int, int, int, +extern void annotate_source (const char *, int, int, int, struct gdbarch *, CORE_ADDR); extern void annotate_frame_begin (int, struct gdbarch *, CORE_ADDR);