This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 03/13] remove some unnecessary calls to as_where ()


From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>

Since we only use the result as arguments to as_bad_where () or
as_warn_where () we can just call as_bad () or as_warn () to get the same
effect.

gas/ChangeLog:

2016-02-21  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

	* config/tc-xtensa.c (finish_vinsn): Remove unnecessary calls to
					     as_where ();
	* symbols.c (S_SET_EXTERNAL): Likewise.
---
 gas/config/tc-xtensa.c | 12 +++---------
 gas/symbols.c          |  7 +------
 2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c
index 5773634..79a0e76 100644
--- a/gas/config/tc-xtensa.c
+++ b/gas/config/tc-xtensa.c
@@ -6327,8 +6327,6 @@ finish_vinsn (vliw_insn *vinsn)
 {
   IStack slotstack;
   int i;
-  char *file_name;
-  unsigned line;
 
   if (find_vinsn_conflicts (vinsn))
     {
@@ -6350,9 +6348,7 @@ finish_vinsn (vliw_insn *vinsn)
 
   if (vinsn->format == XTENSA_UNDEFINED)
     {
-      as_where (&file_name, &line);
-      as_bad_where (file_name, line,
-		    _("couldn't find a valid instruction format"));
+      as_bad (_("couldn't find a valid instruction format"));
       fprintf (stderr, _("    ops were: "));
       for (i = 0; i < vinsn->num_slots; i++)
 	fprintf (stderr, _(" %s;"),
@@ -6376,8 +6372,7 @@ finish_vinsn (vliw_insn *vinsn)
 
   if (resources_conflict (vinsn))
     {
-      as_where (&file_name, &line);
-      as_bad_where (file_name, line, _("illegal resource usage in bundle"));
+      as_bad (_("illegal resource usage in bundle"));
       fprintf (stderr, "    ops were: ");
       for (i = 0; i < vinsn->num_slots; i++)
 	fprintf (stderr, " %s;",
@@ -6474,8 +6469,7 @@ finish_vinsn (vliw_insn *vinsn)
   /* Now check resource conflicts on the modified bundle.  */
   if (resources_conflict (vinsn))
     {
-      as_where (&file_name, &line);
-      as_bad_where (file_name, line, _("illegal resource usage in bundle"));
+      as_bad (_("illegal resource usage in bundle"));
       fprintf (stderr, "    ops were: ");
       for (i = 0; i < vinsn->num_slots; i++)
 	fprintf (stderr, " %s;",
diff --git a/gas/symbols.c b/gas/symbols.c
index 484badc..4628301 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -2222,13 +2222,8 @@ S_SET_EXTERNAL (symbolS *s)
     }
   if (s->bsym->flags & BSF_SECTION_SYM)
     {
-      char * file;
-      unsigned int line;
-
       /* Do not reassign section symbols.  */
-      as_where (& file, & line);
-      as_warn_where (file, line,
-		     _("section symbols are already global"));
+      as_warn (_("section symbols are already global"));
       return;
     }
 #ifndef TC_GLOBAL_REGISTER_SYMBOL_OK
-- 
2.7.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]