03-unused.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. @@ -195,7 +195,7 @@
  17. // uc is initialized by __unw_getcontext in the parent frame. The first stack
  18. // frame walked is unwind_phase2.
  19. - unsigned framesWalked = 1;
  20. + unsigned framesWalked __attribute__((unused)) = 1;
  21. #ifdef _LIBUNWIND_USE_CET
  22. unsigned long shadowStackTop = _get_ssp();
  23. #endif
  24. @@ -330,7 +330,7 @@
  25. // uc is initialized by __unw_getcontext in the parent frame. The first stack
  26. // frame walked is unwind_phase2_forced.
  27. - unsigned framesWalked = 1;
  28. + unsigned framesWalked __attribute__((unused)) = 1;
  29. // Walk each frame until we reach where search phase said to stop
  30. while (__unw_step_stage2(cursor) > 0) {
  31. diff --git a/contrib/libs/libunwind/src/Unwind-wasm.c b/contrib/libs/libunwind/src/Unwind-wasm.c
  32. --- a/contrib/libs/libunwind/src/Unwind-wasm.c
  33. +++ b/contrib/libs/libunwind/src/Unwind-wasm.c
  34. @@ -102,8 +102,8 @@
  35. }
  36. /// Not used in Wasm.
  37. -_LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context,
  38. - uintptr_t value) {}
  39. +_LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context __attribute__((unused)),
  40. + uintptr_t value __attribute__((unused))) {}
  41. /// Called by personality handler to get LSDA for current frame.
  42. _LIBUNWIND_EXPORT uintptr_t
  43. @@ -116,7 +116,7 @@
  44. /// Not used in Wasm.
  45. _LIBUNWIND_EXPORT uintptr_t
  46. -_Unwind_GetRegionStart(struct _Unwind_Context *context) {
  47. +_Unwind_GetRegionStart(struct _Unwind_Context *context __attribute__((unused))) {
  48. return 0;
  49. }