From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [pushed] gdb: use assignment to initialize variable in tdesc_parse_xml
Date: Fri, 3 Feb 2023 08:25:03 -0500 [thread overview]
Message-ID: <20230203132503.189727-1-simon.marchi@polymtl.ca> (raw)
Since allocate_target_description returns a target_desc_up, use
assignment to initialize the description variable.
Change-Id: Iab3311642c09b95648984f305936f4a4cde09440
---
gdb/xml-tdesc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/xml-tdesc.c b/gdb/xml-tdesc.c
index ba7154c5d56f..a8b0b0566c72 100644
--- a/gdb/xml-tdesc.c
+++ b/gdb/xml-tdesc.c
@@ -638,7 +638,7 @@ tdesc_parse_xml (const char *document, xml_fetch_another fetcher)
return it->second.get ();
memset (&data, 0, sizeof (struct tdesc_parsing_data));
- target_desc_up description (allocate_target_description ());
+ target_desc_up description = allocate_target_description ();
data.tdesc = description.get ();
if (gdb_xml_parse_quick (_("target description"), "gdb-target.dtd",
base-commit: 9a4a44998662fc71b821ce46ad71e5063b38d758
--
2.39.1
reply other threads:[~2023-02-03 13:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230203132503.189727-1-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).