03-unused.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. diff --git a/contrib/libs/libunwind/src/Unwind-EHABI.cpp b/contrib/libs/libunwind/src/Unwind-EHABI.cpp
  2. --- a/contrib/libs/libunwind/src/Unwind-EHABI.cpp
  3. +++ b/contrib/libs/libunwind/src/Unwind-EHABI.cpp
  4. @@ -261,7 +261,7 @@
  5. size_t offset, size_t len) {
  6. bool wrotePC = false;
  7. bool finish = false;
  8. - bool hasReturnAddrAuthCode = false;
  9. + bool hasReturnAddrAuthCode [[maybe_unused]] = false;
  10. while (offset < len && !finish) {
  11. uint8_t byte = getByte(data, offset++);
  12. if ((byte & 0x80) == 0) {
  13. diff --git a/contrib/libs/libunwind/src/UnwindLevel1.c b/contrib/libs/libunwind/src/UnwindLevel1.c
  14. --- a/contrib/libs/libunwind/src/UnwindLevel1.c
  15. +++ b/contrib/libs/libunwind/src/UnwindLevel1.c
  16. @@ -330,7 +330,7 @@
  17. // uc is initialized by __unw_getcontext in the parent frame. The first stack
  18. // frame walked is unwind_phase2_forced.
  19. - unsigned framesWalked = 1;
  20. + unsigned framesWalked __attribute__((unused)) = 1;
  21. // Walk each frame until we reach where search phase said to stop
  22. while (__unw_step_stage2(cursor) > 0) {
  23. diff --git a/contrib/libs/libunwind/src/Unwind-wasm.c b/contrib/libs/libunwind/src/Unwind-wasm.c
  24. --- a/contrib/libs/libunwind/src/Unwind-wasm.c
  25. +++ b/contrib/libs/libunwind/src/Unwind-wasm.c
  26. @@ -102,8 +102,8 @@
  27. }
  28. /// Not used in Wasm.
  29. -_LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context,
  30. - uintptr_t value) {}
  31. +_LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context __attribute__((unused)),
  32. + uintptr_t value __attribute__((unused))) {}
  33. /// Called by personality handler to get LSDA for current frame.
  34. _LIBUNWIND_EXPORT uintptr_t
  35. @@ -116,7 +116,7 @@
  36. /// Not used in Wasm.
  37. _LIBUNWIND_EXPORT uintptr_t
  38. -_Unwind_GetRegionStart(struct _Unwind_Context *context) {
  39. +_Unwind_GetRegionStart(struct _Unwind_Context *context __attribute__((unused))) {
  40. return 0;
  41. }