[libcxx-commits] [PATCH] D104235: [libc++abi] NFC: avoid a -Wunused-parameter warning

Xing Xue via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 14 08:48:08 PDT 2021


xingxue created this revision.
xingxue added reviewers: ldionne, sfertile, compnerd.
xingxue added a project: LLVM.
xingxue requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.

A -Wunused-parameter warning was introduced by patch rG7f0244afa828 <https://reviews.llvm.org/rG7f0244afa828e0ef725a3f951304577090495713> [libc++abi] NFC: adding a new parameter base to functions for calculating… (authored by xingxue). The unused parameter `base` will be used in a follow-on patch D101298 <https://reviews.llvm.org/D101298>. This patch is to avoid the warning before D101298 <https://reviews.llvm.org/D101298> is landed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D104235

Files:
  libcxxabi/src/cxa_personality.cpp


Index: libcxxabi/src/cxa_personality.cpp
===================================================================
--- libcxxabi/src/cxa_personality.cpp
+++ libcxxabi/src/cxa_personality.cpp
@@ -247,6 +247,11 @@
 uintptr_t
 readEncodedPointer(const uint8_t** data, uint8_t encoding, uintptr_t base = 0)
 {
+    // Parameter 'base' will be used by a follow-on patch. Before that patch
+    // is landed the following statement is to avoid the -Wunused-parameter
+    // warning for now.
+    (void)base;
+
     uintptr_t result = 0;
     if (encoding == DW_EH_PE_omit)
         return result;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104235.351885.patch
Type: text/x-patch
Size: 586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210614/ddaaa987/attachment-0001.bin>


More information about the libcxx-commits mailing list