[PATCH] D56984: [libunwind] Silence warnings about unused parameters

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 20 13:37:10 PST 2019


mstorsjo created this revision.
mstorsjo added reviewers: mclow.lists, EricWF, ldionne.
Herald added a subscriber: libcxx-commits.

Repository:
  rUNW libunwind

https://reviews.llvm.org/D56984

Files:
  src/AddressSpace.hpp
  src/Unwind-seh.cpp
  src/UnwindCursor.hpp


Index: src/UnwindCursor.hpp
===================================================================
--- src/UnwindCursor.hpp
+++ src/UnwindCursor.hpp
@@ -789,6 +789,8 @@
   if (regNum >= UNW_ARM_D0 && regNum <= UNW_ARM_D31) return true;
 #elif defined(_LIBUNWIND_TARGET_AARCH64)
   if (regNum >= UNW_ARM64_D0 && regNum <= UNW_ARM64_D31) return true;
+#else
+  (void)regNum;
 #endif
   return false;
 }
@@ -816,6 +818,7 @@
 #elif defined(_LIBUNWIND_TARGET_AARCH64)
   return _msContext.V[regNum - UNW_ARM64_D0].D[0];
 #else
+  (void)regNum;
   _LIBUNWIND_ABORT("float registers unimplemented");
 #endif
 }
@@ -843,6 +846,8 @@
 #elif defined(_LIBUNWIND_TARGET_AARCH64)
   _msContext.V[regNum - UNW_ARM64_D0].D[0] = value;
 #else
+  (void)regNum;
+  (void)value;
   _LIBUNWIND_ABORT("float registers unimplemented");
 #endif
 }
Index: src/Unwind-seh.cpp
===================================================================
--- src/Unwind-seh.cpp
+++ src/Unwind-seh.cpp
@@ -53,6 +53,7 @@
 /// Exception cleanup routine used by \c _GCC_specific_handler to
 /// free foreign exceptions.
 static void seh_exc_cleanup(_Unwind_Reason_Code urc, _Unwind_Exception *exc) {
+  (void)urc;
   if (exc->exception_class != kSEHExceptionClass)
     _LIBUNWIND_ABORT("SEH cleanup called on non-SEH exception");
   free(exc);
@@ -212,6 +213,8 @@
 __libunwind_seh_personality(int version, _Unwind_Action state,
                             uint64_t klass, _Unwind_Exception *exc,
                             struct _Unwind_Context *context) {
+  (void)version;
+  (void)klass;
   EXCEPTION_RECORD ms_exc;
   bool phase2 = (state & (_UA_SEARCH_PHASE|_UA_CLEANUP_PHASE)) == _UA_CLEANUP_PHASE;
   ms_exc.ExceptionCode = STATUS_GCC_THROW;
Index: src/AddressSpace.hpp
===================================================================
--- src/AddressSpace.hpp
+++ src/AddressSpace.hpp
@@ -457,6 +457,8 @@
 #elif defined(_LIBUNWIND_SUPPORT_SEH_UNWIND) && defined(_WIN32)
   // Don't even bother, since Windows has functions that do all this stuff
   // for us.
+  (void)targetAddr;
+  (void)info;
   return true;
 #elif defined(_LIBUNWIND_ARM_EHABI) && defined(__BIONIC__) &&                  \
     (__ANDROID_API__ < 21)
@@ -597,6 +599,11 @@
       return true;
     }
   }
+#else
+  (void)addr;
+  (void)buf;
+  (void)bufLen;
+  (void)offset;
 #endif
   return false;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56984.182713.patch
Type: text/x-patch
Size: 2344 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190120/458c236d/attachment.bin>


More information about the cfe-commits mailing list