diff options
author | Damjan Jovanovic <damjan@apache.org> | 2015-12-13 23:55:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-15 13:55:43 +0000 |
commit | cfe08df695c046371c4361a434176e6381e3e064 (patch) | |
tree | 5cd30772fc284c8eee1b7573a8f3f2385c73a366 /sal | |
parent | 66add63dda22321476653d06a61bc61090fafc58 (diff) |
Use %tx to print ptrdiff_t.
Patch by: me
(cherry picked from commit 7d41b0a9559a388fe558cf7e8d81e4909a785af3)
Change-Id: I5e087de043bf454268e4a3ccf24d9e25de3735ee
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/backtrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c index a03ab7d1090f..c5fbfbf24948 100644 --- a/sal/osl/unx/backtrace.c +++ b/sal/osl/unx/backtrace.c @@ -112,12 +112,12 @@ void backtrace_symbols_fd( void **buffer, int size, int fd ) if ( dli.dli_fname && dli.dli_fbase ) { offset = (ptrdiff_t)*pFramePtr - (ptrdiff_t)dli.dli_fbase; - fprintf( fp, "%s+0x%x", dli.dli_fname, offset ); + fprintf( fp, "%s+0x%" SAL_PRI_PTRDIFFT "x", dli.dli_fname, offset ); } if ( dli.dli_sname && dli.dli_saddr ) { offset = (ptrdiff_t)*pFramePtr - (ptrdiff_t)dli.dli_saddr; - fprintf( fp, "(%s+0x%x)", dli.dli_sname, offset ); + fprintf( fp, "(%s+0x%" SAL_PRI_PTRDIFFT "x)", dli.dli_sname, offset ); } } fprintf( fp, "[%p]\n", *pFramePtr ); |