Skip to content

Commit 7c651a1

Browse files
authored
[libunwind][AIX] static_cast the value from getLR() to avoid the warning 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.
1 parent 00d3ed6 commit 7c651a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libunwind/src/UnwindCursor.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2404,7 +2404,7 @@ int UnwindCursor<A, R>::stepWithTBTable(pint_t pc, tbtable *TBTable,
24042404
if (!TBTable->tb.saves_lr && registers.getLR()) {
24052405
// This case should only occur if we were called from a signal handler
24062406
// and the signal occurred in a function that doesn't save the LR.
2407-
returnAddress = registers.getLR();
2407+
returnAddress = static_cast<pint_t>(registers.getLR());
24082408
_LIBUNWIND_TRACE_UNWINDING("Use saved LR=%p",
24092409
reinterpret_cast<void *>(returnAddress));
24102410
} else {

0 commit comments

Comments
 (0)