* [COMMITTED PATCH] avoid strange arithmetic with strings in ldmisc.c
@ 2013-10-10 22:51 Roland McGrath
0 siblings, 0 replies; only message in thread
From: Roland McGrath @ 2013-10-10 22:51 UTC (permalink / raw)
To: binutils
Committed as obvious enough, to trunk and 2.24 branch.
Thanks,
Roland
ld/
2013-10-10 Roland McGrath <mcgrathr@google.com>
* ldmisc.c (vfinfo): Use Boolean ? "" : ":" in place of ":" + Boolean.
It silences some compilers' warnings and is much less bizarre to read.
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -1,6 +1,6 @@
/* ldmisc.c
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2012, 2013
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -361,7 +361,7 @@ vfinfo (FILE *fp, const char *fmt, va_list arg,
bfd_boolean is_warning)
if (functionname != NULL && fmt[-1] == 'G')
lfinfo (fp, "%T", functionname);
else if (filename != NULL && linenumber != 0)
- fprintf (fp, "%u%s", linenumber, ":" + done);
+ fprintf (fp, "%u%s", linenumber, done ? "" : ":");
else
done = FALSE;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-10-10 22:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-10 22:51 [COMMITTED PATCH] avoid strange arithmetic with strings in ldmisc.c Roland McGrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).