Skip to content

Commit

Permalink
[libunwind][AIX] static_cast the value from getLR() to avoid the warn…
Browse files Browse the repository at this point in the history
…ing from -Wconversion (llvm#69767)

This PR adds `static_cast` to the value returned from `getLR()` in the
AIX unwinder to avoid warning in case `-Wconversion` is specified to
build in 32-bit mode.
  • Loading branch information
xingxue-ibm committed Oct 24, 2023
1 parent 00d3ed6 commit 7c651a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libunwind/src/UnwindCursor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2404,7 +2404,7 @@ int UnwindCursor<A, R>::stepWithTBTable(pint_t pc, tbtable *TBTable,
if (!TBTable->tb.saves_lr && registers.getLR()) {
// This case should only occur if we were called from a signal handler
// and the signal occurred in a function that doesn't save the LR.
returnAddress = registers.getLR();
returnAddress = static_cast<pint_t>(registers.getLR());
_LIBUNWIND_TRACE_UNWINDING("Use saved LR=%p",
reinterpret_cast<void *>(returnAddress));
} else {
Expand Down

0 comments on commit 7c651a1

Please sign in to comment.