From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tom@tromey.com>,
Simon Marchi <simon.marchi@ericsson.com>,
gdb-patches@sourceware.org
Subject: Re: [RFA] Make macOS build warning-free
Date: Fri, 13 Jul 2018 17:16:00 -0000 [thread overview]
Message-ID: <87k1pzawfa.fsf@tromey.com> (raw)
In-Reply-To: <5f9b4ce1-aa8d-30e3-98f9-f2c36c3869c6@simark.ca> (Simon Marchi's message of "Mon, 2 Jul 2018 12:53:09 -0400")
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
>> I think in the meantime I'll just --disable-nls. Perhaps you wouldn't
>> mind approving the symfile.c change in isolation.
Simon> That bit looks good to me, at least to shut up the compiler.
I forgot about this for a while, but here is the patch I am checking in.
Tom
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 --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7b808eb3a76..66b7c3681e2 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 48eca5cc0ea..62b38bd6182 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. */
prev parent reply other threads:[~2018-07-13 17:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-29 16:55 Tom Tromey
2018-06-29 21:34 ` Simon Marchi
2018-07-02 14:58 ` Tom Tromey
2018-07-02 16:53 ` Simon Marchi
2018-07-03 13:17 ` Tom Tromey
2018-07-03 15:58 ` Simon Marchi
2018-07-03 17:43 ` Tom Tromey
2018-07-13 17:16 ` Tom Tromey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1pzawfa.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
--cc=simon.marchi@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox