[libunwind] 1c39ffe - [libunwind] Fix warning when building without frameheader cache
Mikael Holmen via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 25 04:02:18 PDT 2020
Author: Mikael Holmen
Date: 2020-08-25T12:58:39+02:00
New Revision: 1c39ffecd84a5eba54f5fabb433b0192d1dbd3b4
URL: https://github.com/llvm/llvm-project/commit/1c39ffecd84a5eba54f5fabb433b0192d1dbd3b4
DIFF: https://github.com/llvm/llvm-project/commit/1c39ffecd84a5eba54f5fabb433b0192d1dbd3b4.diff
LOG: [libunwind] Fix warning when building without frameheader cache
Without the fix the compiler warns with
/data/repo/master/libunwind/src/AddressSpace.hpp:436:44: warning: unused parameter 'pinfo_size' [-Wunused-parameter]
size_t pinfo_size, void *data) {
^
1 warning generated.
Added:
Modified:
libunwind/src/AddressSpace.hpp
Removed:
################################################################################
diff --git a/libunwind/src/AddressSpace.hpp b/libunwind/src/AddressSpace.hpp
index b3949b2d27a4..717aa336fd13 100644
--- a/libunwind/src/AddressSpace.hpp
+++ b/libunwind/src/AddressSpace.hpp
@@ -440,6 +440,9 @@ static int findUnwindSectionsByPhdr(struct dl_phdr_info *pinfo,
#if defined(_LIBUNWIND_USE_FRAME_HEADER_CACHE)
if (ProcessFrameHeaderCache.find(pinfo, pinfo_size, data))
return 1;
+#else
+ // Avoid warning about unused variable.
+ (void)pinfo_size;
#endif
Elf_Addr image_base = calculateImageBase(pinfo);
More information about the cfe-commits
mailing list