This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 13/13] make as_where () return const char *
- From: tbsaunde+binutils at tbsaunde dot org
- To: binutils at sourceware dot org
- Date: Sun, 21 Feb 2016 21:02:13 -0500
- Subject: [PATCH 13/13] make as_where () return const char *
- Authentication-results: sourceware.org; auth=none
- References: <1456106533-19089-1-git-send-email-tbsaunde+binutils at tbsaunde dot org>
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
gas/ChangeLog:
2016-02-21 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* input-scrub.c (as_where): Change return type to const char *.
* as.h (as_wheree): Adjust.
---
gas/as.h | 2 +-
gas/input-scrub.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gas/as.h b/gas/as.h
index 3add923..4ee3f1b 100644
--- a/gas/as.h
+++ b/gas/as.h
@@ -499,7 +499,7 @@ void cond_finish_check (int);
void cond_exit_macro (int);
int seen_at_least_1_file (void);
void app_pop (char *);
-char * as_where (unsigned int *);
+const char * as_where (unsigned int *);
void bump_line_counters (void);
void do_scrub_begin (int);
void input_scrub_begin (void);
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index def9298..4bbb38f 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -484,7 +484,7 @@ new_logical_line (const char *fname, int line_number)
/* Return the current file name and line number. */
-char *
+const char *
as_where (unsigned int *linep)
{
if (logical_input_file != NULL
@@ -492,13 +492,13 @@ as_where (unsigned int *linep)
{
if (linep != NULL)
*linep = logical_input_line;
- return (char *) logical_input_file;
+ return logical_input_file;
}
else if (physical_input_file != NULL)
{
if (linep != NULL)
*linep = physical_input_line;
- return (char *) physical_input_file;
+ return physical_input_file;
}
else
{
--
2.7.0