public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: use assignment to initialize variable in tdesc_parse_xml
@ 2023-02-03 13:24 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2023-02-03 13:24 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e3ee979c1f24984eb93b32822338aa425afbc2af

commit e3ee979c1f24984eb93b32822338aa425afbc2af
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Fri Feb 3 08:23:32 2023 -0500

    gdb: use assignment to initialize variable in tdesc_parse_xml
    
    Since allocate_target_description returns a target_desc_up, use
    assignment to initialize the description variable.
    
    Change-Id: Iab3311642c09b95648984f305936f4a4cde09440

Diff:
---
 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 ba7154c5d56..a8b0b0566c7 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",

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-03 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03 13:24 [binutils-gdb] gdb: use assignment to initialize variable in tdesc_parse_xml Simon Marchi

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).