public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Remove a nullptr check in DWARF scanner
@ 2022-10-17 18:58 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-10-17 18:58 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

In scan_attributes, The DWARF scanner checks whether maybe_defer is
nullptr, but this can never happen.  This patch removes the check.
---
 gdb/dwarf2/read.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 33dfd52b362..b5efcb3cc09 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -18217,7 +18217,6 @@ cooked_indexer::scan_attributes (dwarf2_per_cu_data *scanning_per_cu,
 
 	  if (new_reader->cu == reader->cu
 	      && new_info_ptr > watermark_ptr
-	      && maybe_defer != nullptr
 	      && *parent_entry == nullptr)
 	    *maybe_defer = form_addr (origin_offset, origin_is_dwz);
 	  else if (*parent_entry == nullptr)
-- 
2.34.3


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

only message in thread, other threads:[~2022-10-17 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17 18:58 [pushed] Remove a nullptr check in DWARF scanner Tom Tromey

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