Workaround 'function is never used' cppcheck style warnings
authorIvan Maidanski <ivmai@mail.ru>
Thu, 17 Nov 2016 08:40:34 +0000 (11:40 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 17 Nov 2016 08:40:34 +0000 (11:40 +0300)
commitc5d4ef9c1bc7ebca7e710bd96d78d28fb5fe1449
tree10ebc5b49f694d8c7704fccf1c668b6938ec15b1
parenta563b883dd221bf51d0df4b65c95833d33960b3d
Workaround 'function is never used' cppcheck style warnings

* tests/test.c [DBG_HDRS_ALL || MAKE_BACK_GRAPH] (GC_DEBUG): Do not
define if CPPCHECK.
* tests/test.c (NO_TEST_HANDLE_FORK): Define also if not GC_PTHREADS;
do not define if CPPCHECK.
* tests/test.c: Include gc_inline.h, javaxfc.h if CPPCHECK.
* tests/test.c [!PCR && !GC_WIN32_THREADS && !GC_PTHREADS] (main): Call
GC_noop1(&WinMain) if CPPCHECK and not NO_WINMAIN_ENTRY; call
GC_noop1(&Init) if CPPCHECK and RTEMS.
* tests/test.c [!PCR && !GC_WIN32_THREADS && !GC_PTHREADS && CPPCHECK]
(UNTESTED): New macro.
* tests/test.c [!PCR && !GC_WIN32_THREADS && !GC_PTHREADS && CPPCHECK]
(main): Call UNTESTED() for GC_debug_end_stubborn_change,
GC_debug_generic_or_special_malloc, GC_debug_register_displacement,
GC_post_incr, GC_pre_incr, GC_debug_gcj_malloc, GC_amiga_get_mem,
GC_amiga_set_toany, GC_MacTemporaryNewPtr, test, GetFileLineFromStack,
GetModuleNameFromStack, GetSymbolNameFromStack, GC_get_bytes_since_gc,
GC_get_dont_expand, GC_get_dont_precollect, GC_get_finalize_on_demand,
GC_get_finalizer_notifier, GC_get_find_leak,
GC_get_force_unmap_on_gcollect, GC_get_free_bytes,
GC_get_free_space_divisor, GC_get_full_freq, GC_get_java_finalization,
GC_get_max_retries, GC_get_no_dls, GC_get_non_gc_bytes,
GC_get_on_collection_event, GC_get_on_heap_resize,
GC_get_pages_executable, GC_get_push_other_roots, GC_get_start_callback,
GC_get_stop_func, GC_get_time_limit, GC_get_warn_proc, GC_is_disabled,
GC_set_dont_precollect, GC_set_finalize_on_demand,
GC_set_finalizer_notifier, GC_set_free_space_divisor, GC_set_full_freq,
GC_set_java_finalization, GC_set_max_retries, GC_set_no_dls,
GC_set_non_gc_bytes, GC_set_on_collection_event, GC_set_on_heap_resize,
GC_set_oom_fn, GC_set_pages_executable, GC_set_push_other_roots,
GC_set_start_callback, GC_set_stop_func, GC_set_time_limit,
GC_malloc_explicitly_typed_ignore_off_page, GC_debug_change_stubborn,
GC_debug_strndup, GC_strndup, GC_posix_memalign, GC_new_free_list,
GC_new_kind, GC_new_proc, GC_clear_roots, GC_exclude_static_roots,
GC_expand_hp, GC_register_describe_type_fn,
GC_register_has_static_roots_callback, GC_get_abort_func,
GC_set_abort_func, GC_gcj_malloc_ignore_off_page, GC_dump_regions,
GC_is_tmp_root, GC_print_free_list, GC_print_trace,
GC_debug_register_finalizer_unreachable, GC_get_await_finalize_proc,
GC_register_disappearing_link, GC_set_await_finalize_proc,
GC_should_invoke_finalizers, GC_finalize_all, GC_dump_finalization,
GC_get_toggleref_func, GC_set_toggleref_func, GC_toggleref_add,
GC_set_log_fd, GC_allow_register_threads, GC_get_on_thread_event,
GC_register_altstack, GC_set_on_thread_event, GC_pthread_detach,
GC_dlopen, GC_pthread_cancel, GC_pthread_exit, GC_pthread_sigmask,
GC_set_suspend_signal, GC_set_thr_restart_signal, GC_ExitThread,
GC_beginthreadex, GC_endthreadex, strndup, strdup, realloc, GC_wcsdup,
GC_debug_wcsdup.
* tests/test.c [!NO_WINMAIN_ENTRY] (WinMain): Call GC_noop1(&WinMain)
if CPPCHECK.
* tests/test.c [PCR] (test): Call GC_noop1(&PCR_GC_Run),
GC_noop1(&PCR_GC_Setup) if CPPCHECK.
tests/test.c