/* A user-supplied routine that is called to determine if a DSO must
be scanned by the gc. */
-static int (*GC_has_static_roots)(const char *, void *, size_t);
+MAYBE_UNUSED static int (*GC_has_static_roots)(const char *, void *, size_t);
/* PLTSCHEME: added OPENBSD: */
#if (defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE)) \
ptr_t GC_get_main_stack_base(void)
{
# if defined(HEURISTIC1) || defined(HEURISTIC2)
- word dummy;
+ MAYBE_UNUSED word dummy;
# endif
- ptr_t result;
+ MAYBE_UNUSED ptr_t result;
# define STACKBOTTOM_ALIGNMENT_M1 ((word)STACK_GRAN - 1)
/* FIXME - Implement better strategies here. */
int GC_get_stack_base(struct GC_stack_base *b)
{
- int dummy;
+ MAYBE_UNUSED int dummy;
# ifdef NEED_FIND_LIMIT
# ifdef STACK_GROWS_DOWN
# endif /* MSWIN32 || MSWINCE */
{
# if !defined(MSWIN32) && !defined(MSWINCE)
- int code = si -> si_code; /* Ignore gcc unused var. warning. */
- ucontext_t * scp = (ucontext_t *)raw_sc;
- /* Ignore gcc unused var. warning. */
+ MAYBE_UNUSED int code = si -> si_code;
+ MAYBE_UNUSED ucontext_t * scp = (ucontext_t *)raw_sc;
char *addr = si -> si_addr;
# endif
# if defined(MSWIN32) || defined(MSWINCE)
* On other systems, SET_LOCK_HOLDER and friends must be suitably defined.
*/
-static GC_bool syscall_acquired_lock = FALSE; /* Protected by GC lock. */
+MAYBE_UNUSED static GC_bool syscall_acquired_lock = FALSE; /* Protected by GC lock. */
#if 0
void GC_begin_syscall(void)
#include "private/pthread_support.h"
+#include "private/gc_priv.h"
#if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS) && \
!defined(GC_DARWIN_THREADS) && !defined(GC_OPENBSD_THREADS)
void GC_restart_handler(int sig)
{
- pthread_t my_thread = pthread_self();
- GC_thread me;
+ MAYBE_UNUSED pthread_t my_thread = pthread_self();
+ MAYBE_UNUSED GC_thread me;
if (sig != SIG_THR_RESTART) ABORT("Bad signal in suspend_handler");