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: work around daft warning


In message <20120518054902.GB29815@bubble.grove.modra.org>
          Alan Modra <amodra@gmail.com> wrote:

> +	      if (asprintf (&label, "%c%s", leading_char, name))
> +		{ /* Avoid warning */ }

When asprintf() fails, contents of label is undefined, isn't it better
to have label = NULL in the if () body ? Not sure whether the rest of
the code can deal with label being NULL...

John.
-- 
John Tytgat, in his comfy chair at home
John.Tytgat@aaug.net


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