aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2013-10-10 22:50:40 +0000
committerRoland McGrath <roland@gnu.org>2013-10-10 22:50:40 +0000
commit18ff9b9b57decb0437a2a9d8153903d36d4c0079 (patch)
tree839a3cd9df4fbda33f14d4b513748931365f9ea8 /ld
parent2b4e983c393c6cd5b9ed786f4c4f5eb9b34b2b77 (diff)
downloadgdb-18ff9b9b57decb0437a2a9d8153903d36d4c0079.zip
gdb-18ff9b9b57decb0437a2a9d8153903d36d4c0079.tar.gz
gdb-18ff9b9b57decb0437a2a9d8153903d36d4c0079.tar.bz2
ld/
* ldmisc.c (vfinfo): Use Boolean ? "" : ":" in place of ":" + Boolean. It silences some compilers' warnings and is much less bizarre to read.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ldmisc.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b45aa69..14287dd 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2013-10-09 Roland McGrath <mcgrathr@google.com>
* emultempl/elf32.em (id_note_section_size): Use ATTRIBUTE_UNUSED
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 2569bcc..1b69ab1 100644
--- 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;
}