This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Cast _Unwind_GetCFA return to _Unwind_Ptr first
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 16 Mar 2012 10:50:58 -0700
- Subject: PATCH: Cast _Unwind_GetCFA return to _Unwind_Ptr first
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
_Unwind_GetCFA returns _Unwind_Word which may be 64bit on targets with
32bit pointers, like x32. This patch casts _Unwind_GetCFA return to
_Unwind_Ptr first to silence GCC warning. OK to install?
Thanks.
H.J.
---
2012-03-16 H.J. Lu <hongjiu.lu@intel.com>
* unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
_Unwind_Ptr first.
diff --git a/nptl/unwind.c b/nptl/unwind.c
index 0571026..7ccb213 100644
--- a/nptl/unwind.c
+++ b/nptl/unwind.c
@@ -68,7 +68,7 @@ unwind_stop (int version, _Unwind_Action actions,
registered with the old method which would be unwound by this
step. */
struct _pthread_cleanup_buffer *oldp = buf->priv.data.cleanup;
- void *cfa = (void *) _Unwind_GetCFA (context);
+ void *cfa = (void *) (_Unwind_Ptr) _Unwind_GetCFA (context);
if (curp != oldp && (do_longjump || FRAME_LEFT (cfa, curp, adj)))
{
--
1.7.6.5