Skip to content

Commit 63c1208

Browse files
authored
[libunwind][nfc] Avoid type warning of debug printf (#67390)
Change PRIu32 to PRIxPTR to avoid type warning of debug printf since VE uses 64 bits SjLj. I don't use PRIuPTR since the print message has 0x-prefix from the beginning. I also change related PRIuPTR to PRIxPTR since those uses 0x-prefix too.
1 parent 0053cb8 commit 63c1208

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libunwind/src/Unwind-sjlj.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetGR(struct _Unwind_Context *context,
427427
/// Called by personality handler during phase 2 to alter register values.
428428
_LIBUNWIND_EXPORT void _Unwind_SetGR(struct _Unwind_Context *context, int index,
429429
uintptr_t new_value) {
430-
_LIBUNWIND_TRACE_API("_Unwind_SetGR(context=%p, reg=%d, value=0x%" PRIuPTR
430+
_LIBUNWIND_TRACE_API("_Unwind_SetGR(context=%p, reg=%d, value=0x%" PRIxPTR
431431
")",
432432
(void *)context, index, new_value);
433433
_Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context;
@@ -438,7 +438,7 @@ _LIBUNWIND_EXPORT void _Unwind_SetGR(struct _Unwind_Context *context, int index,
438438
/// Called by personality handler during phase 2 to get instruction pointer.
439439
_LIBUNWIND_EXPORT uintptr_t _Unwind_GetIP(struct _Unwind_Context *context) {
440440
_Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context;
441-
_LIBUNWIND_TRACE_API("_Unwind_GetIP(context=%p) => 0x%" PRIu32,
441+
_LIBUNWIND_TRACE_API("_Unwind_GetIP(context=%p) => 0x%" PRIxPTR,
442442
(void *)context, ufc->resumeLocation + 1);
443443
return ufc->resumeLocation + 1;
444444
}
@@ -451,7 +451,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetIPInfo(struct _Unwind_Context *context,
451451
int *ipBefore) {
452452
_Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context;
453453
*ipBefore = 0;
454-
_LIBUNWIND_TRACE_API("_Unwind_GetIPInfo(context=%p, %p) => 0x%" PRIu32,
454+
_LIBUNWIND_TRACE_API("_Unwind_GetIPInfo(context=%p, %p) => 0x%" PRIxPTR,
455455
(void *)context, (void *)ipBefore,
456456
ufc->resumeLocation + 1);
457457
return ufc->resumeLocation + 1;
@@ -461,7 +461,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetIPInfo(struct _Unwind_Context *context,
461461
/// Called by personality handler during phase 2 to alter instruction pointer.
462462
_LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context,
463463
uintptr_t new_value) {
464-
_LIBUNWIND_TRACE_API("_Unwind_SetIP(context=%p, value=0x%" PRIuPTR ")",
464+
_LIBUNWIND_TRACE_API("_Unwind_SetIP(context=%p, value=0x%" PRIxPTR ")",
465465
(void *)context, new_value);
466466
_Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context;
467467
ufc->resumeLocation = new_value - 1;

0 commit comments

Comments
 (0)