diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2011-09-14 21:52:49 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-09-14 21:52:49 +0400 |
commit | 47e74a0090ee55945ab0207afbcbdedef969ec47 (patch) | |
tree | 6023c4e203ec247b40dc2d53dc4f24907ba86b24 /misc.c | |
parent | 2082770db88c2a1de0f7d24aa7637366ae9e1996 (diff) | |
download | bdwgc-47e74a0090ee55945ab0207afbcbdedef969ec47.tar.gz |
Replace ARGSUSED comment-based annotation with GCC 'unused' attribute.
Turn on unused-parameter checking for GCC.
* alloc.c (GC_try_to_collect_general): Add GC_ATTR_UNUSED attribute
to an argument.
* tests/test.c (tiny_reverse_test, thr_run_one_test): Likewise.
* backgraph.c (reset_back_edge, update_max_height): Replace ARGSUSED
annotation with GC_ATTR_UNUSED attribute for some arguments.
* checksums.c (GC_add_block): Likewise.
* dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change,
GC_check_heap_block): Likewise.
* finalize.c (GC_null_finalize_mark_proc): Likewise.
* gcj_mlc.c (GC_gcj_fake_mark_proc): Likewise.
* mark.c (GC_noop, clear_marks_for_block, GC_mark_and_push): Likewise.
* mark_rts.c (GC_push_conditional_with_exclusions,
GC_push_current_stack): Likewise.
* misc.c (GC_default_oom_fn, GC_do_blocking_inner): Likewise.
* os_dep.c (GC_fault_handler_openbsd, GC_fault_handler,
GC_remove_protection, GC_page_was_dirty, GC_page_was_ever_dirty):
Likewise.
* pthread_stop_world.c (GC_suspend_handler, GC_suspend_handler_inner):
Likewise.
* pthread_support.c (GC_do_blocking_inner): Likewise.
* stubborn.c (GC_change_stubborn, GC_end_stubborn_change): Likewise.
* tests/test.c (fail_proc1): Likewise.
* typd_mlc.c (GC_array_mark_proc): Likewise.
* win32_threads.c (GC_do_blocking_inner, DllMain): Likewise.
* include/private/gc_priv.h (GC_ATTR_UNUSED): Define new macro.
* cordxtra.c (CORD_ATTR_UNUSED): Likewise.
* cordxtra.c (CORD_nul_func, CORD_lf_close_proc): Replace ARGSUSED
annotation with CORD_ATTR_UNUSED attribute for an argument.
* mach_dep.c (GC_clear_stack_inner): Remove ARGSUSED annotation and
use "limit" argument in the function (to suppress compiler warning).
* misc.c (GC_clear_stack_inner): Remove ARGSUSED.
* tests/threadkey_test.c (on_thread_exit_inner, on_thread_exit):
Use all function arguments (to suppress compiler warning).
* configure.ac (CFLAGS): Remove "-Wno-unused-parameter" option.
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -141,8 +141,8 @@ GC_bool GC_quiet = 0; /* used also in pcr_interface.c */ GC_INNER long GC_large_alloc_warn_interval = GC_LARGE_ALLOC_WARN_INTERVAL; /* Interval between unsuppressed warnings. */ -/*ARGSUSED*/ -STATIC void * GC_CALLBACK GC_default_oom_fn(size_t bytes_requested) +STATIC void * GC_CALLBACK GC_default_oom_fn( + size_t bytes_requested GC_ATTR_UNUSED) { return(0); } @@ -255,7 +255,6 @@ GC_INNER void GC_extend_size_map(size_t i) /* Clear the stack up to about limit. Return arg. This function is */ /* not static because it could also be errorneously defined in .S */ /* file, so this error would be caught by the linker. */ - /*ARGSUSED*/ void * GC_clear_stack_inner(void *arg, ptr_t limit) { word dummy[CLEAR_SIZE]; @@ -1578,8 +1577,7 @@ GC_API void * GC_CALL GC_call_with_gc_active(GC_fn_type fn, } /* This is nearly the same as in win32_threads.c */ -/*ARGSUSED*/ -STATIC void GC_do_blocking_inner(ptr_t data, void * context) +STATIC void GC_do_blocking_inner(ptr_t data, void * context GC_ATTR_UNUSED) { struct blocking_data * d = (struct blocking_data *) data; GC_ASSERT(GC_is_initialized); |