This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, libbacktrace]: fix pointer from integer without a cast
- From: Ian Lance Taylor <iant at google dot com>
- To: "Duncan Mac-Vicar P." <dmacvicar at suse dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, zawertun at gmail dot com
- Date: Sat, 5 Jul 2014 15:42:06 -0700
- Subject: Re: [PATCH, libbacktrace]: fix pointer from integer without a cast
- Authentication-results: sourceware.org; auth=none
- References: <53B52391 dot 4030908 at suse dot de>
On Thu, Jul 3, 2014 at 2:34 AM, Duncan Mac-Vicar P. <dmacvicar@suse.de> wrote:
>
> the following patch fixes some post-build-checks from our distro build
> system, better to upstream it:
>
> [ 4077s] E: rust 64bit-portability-issue
> /home/abuild/rpmbuild/BUILD/rust-0.11.0+git.1403898616.aa1163b/src/libbacktrace/dwarf.c:2690,
> 2873, 3005
> [ 4077s] E: rust 64bit-portability-issue
> /home/abuild/rpmbuild/BUILD/rust-0.11.0+git.1403898616.aa1163b/src/libbacktrace/elf.c:448,
> 493, 970
> [ 4077s] E: rust 64bit-portability-issue
> /home/abuild/rpmbuild/BUILD/rust-0.11.0+git.1403898616.aa1163b/src/libbacktrace/fileline.c:75
>
> libbacktrace/ChangeLog:
>
> 2014-07-03 Yaroslav Sidlovsky <zawertun@gmail.com>
> * dwarf.c, elf.c, fileline.c: fix pointer from integer without a
> cast
That error doesn't make much sense and I'm not sure the patch is
really right.
I don't know what program is generating these messages, but does this
patch fix the problem?
Ian
Index: internal.h
===================================================================
--- internal.h (revision 211658)
+++ internal.h (working copy)
@@ -99,7 +99,7 @@ extern void backtrace_atomic_store_int (
/* We have neither the sync nor the atomic functions. These will
never be called. */
-#define backtrace_atomic_load_pointer(p) (abort(), 0)
+#define backtrace_atomic_load_pointer(p) (abort(), (void *) NULL)
#define backtrace_atomic_load_int(p) (abort(), 0)
#define backtrace_atomic_store_pointer(p, v) abort()
#define backtrace_atomic_store_size_t(p, v) abort()