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]

Re: as error output not -j64 safe


On May 22, 2014, at 12:21 AM, Alan Modra <amodra@gmail.com> wrote:
> I don't think it matters.  We have "Error:" and "Warning:" already in
> listing.c, so that should match.
> 
> Hmm, that means in listings we print
> 
> 	Error:blahblahblah

> Life isn't perfect.  :)

It can be.  Try this out, if it tests out ok, either check it in (or let me know and I can).

diff --git a/gas/listing.c b/gas/listing.c
index 24450cf..69db6d2 100644
--- a/gas/listing.c
+++ b/gas/listing.c
@@ -234,10 +234,11 @@ listing_message (const char *name, const char *message)
 {
   if (listing_tail != (list_info_type *) NULL)
     {
-      unsigned int l = strlen (name) + strlen (message) + 1;
+      unsigned int l = strlen (name) + 1 + strlen (message) + 1;
       char *n = (char *) xmalloc (l);
       struct list_message *lm = xmalloc (sizeof *lm);
       strcpy (n, name);
+      strcat (n, " ");
       strcat (n, message);
       lm->message = n;
       lm->next = NULL;


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