[PATCH] D46810: 3/3: Fix DWARFUnit::GetUnitDIEPtrOnly stale pointer

Jan Kratochvil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 11:59:13 PDT 2018


jankratochvil marked an inline comment as done.
jankratochvil added inline comments.


================
Comment at: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:208
+void DWARFUnit::ExtractDIEsEndCheck(lldb::offset_t offset) const {
+  lldb::offset_t next_cu_offset = GetNextCompileUnitOffset();
+
----------------
xiaobai wrote:
> This function introduces a warning because `next_cu_offset` is never used within this function. Did you intend to use it in the if conditional below? It looks like you call `GetNextCompileUnitOffset` there instead of using `next_cu_offset`.
Fixed now in rL333449, sorry. Yes, you are right, it remained there from refactorizations.

GDB is using `-Werror` so I was not used to watch for compiler warnings.



Repository:
  rL LLVM

https://reviews.llvm.org/D46810





More information about the llvm-commits mailing list