This patch to libbacktrace avoids a compilation warning when building libbacktrace with an old compiler. This fixes PR 91908. Bootstrapped and ran libbacktrace tests. Committed to mainline.
Ian 2019-09-26 Ian Lance Taylor <i...@golang.org> PR libbacktrace/91908 * pecoff.c (backtrace_initialize): Explicitly cast unchecked __sync_bool_compare_and_swap to void. * xcoff.c (backtrace_initialize): Likewise.
Index: pecoff.c =================================================================== --- pecoff.c (revision 275698) +++ pecoff.c (working copy) @@ -922,7 +922,8 @@ backtrace_initialize (struct backtrace_s if (found_sym) backtrace_atomic_store_pointer (&state->syminfo_fn, coff_syminfo); else - __sync_bool_compare_and_swap (&state->syminfo_fn, NULL, coff_nosyms); + (void) __sync_bool_compare_and_swap (&state->syminfo_fn, NULL, + coff_nosyms); } if (!state->threaded) Index: xcoff.c =================================================================== --- xcoff.c (revision 275698) +++ xcoff.c (working copy) @@ -1592,7 +1592,8 @@ backtrace_initialize (struct backtrace_s if (found_sym) backtrace_atomic_store_pointer (&state->syminfo_fn, xcoff_syminfo); else - __sync_bool_compare_and_swap (&state->syminfo_fn, NULL, xcoff_nosyms); + (void) __sync_bool_compare_and_swap (&state->syminfo_fn, NULL, + xcoff_nosyms); } if (!state->threaded)