This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Remove a warning on macOS
- From: Tom Tromey <tromey at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 13 Jul 2018 17:18:51 -0000
- Subject: [binutils-gdb] Remove a warning on macOS
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=027a4c30d03e3f434ddfa61e7f026e3b15f83daa
commit 027a4c30d03e3f434ddfa61e7f026e3b15f83daa
Author: Tom Tromey <tom@tromey.com>
Date: Fri Jul 13 11:14:57 2018 -0600
Remove a warning on macOS
This removes a clang warning coming from -Wmissing-braces.
ChangeLog
2018-07-13 Tom Tromey <tom@tromey.com>
* symfile.c (set_objfile_default_section_offset): Use extra braces
around initializer.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/symfile.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7b808eb..66b7c36 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-13 Tom Tromey <tom@tromey.com>
+
+ * symfile.c (set_objfile_default_section_offset): Use extra braces
+ around initializer.
+
2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
* s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 48eca5c..62b38bd 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2088,7 +2088,7 @@ set_objfile_default_section_offset (struct objfile *objf,
{
/* Add OFFSET to all sections by default. */
std::vector<struct section_offsets> offsets (objf->num_sections,
- { offset });
+ { { offset } });
/* Create sorted lists of all sections in ADDRS as well as all
sections in OBJF. */