From 0e5bd137bb22db2a69e365f6eb1dee9f0dc61b20 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 9 Sep 2012 10:42:48 +0400 Subject: [PATCH] Remove dummy GC_noop call from code visible to Lint tool only (Minor code refactoring.) * misc.c (GC_init): Remove dummy GC_noop call from Lint-only code. * tests/test.c (main): Likewise. --- misc.c | 13 ------------- tests/test.c | 15 --------------- 2 files changed, 28 deletions(-) diff --git a/misc.c b/misc.c index 6180b19d..0133c1a6 100644 --- a/misc.c +++ b/misc.c @@ -1085,19 +1085,6 @@ GC_API void GC_CALL GC_init(void) # ifdef STUBBORN_ALLOC GC_stubborn_init(); # endif - /* Convince lint that some things are used */ -# ifdef LINT - { - extern char * const GC_copyright[]; - GC_noop(GC_copyright, GC_find_header, GC_push_one, - GC_call_with_alloc_lock, GC_dont_expand, -# ifndef NO_DEBUGGING - GC_dump, -# endif - GC_register_finalizer_no_order); - } -# endif - if (GC_find_leak) { /* This is to give us at least one chance to detect leaks. */ /* This may report some very benign leaks, but ... */ diff --git a/tests/test.c b/tests/test.c index ad22f23b..e4d6af40 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1533,21 +1533,6 @@ void GC_CALLBACK warn_proc(char *msg, GC_word p) # ifndef MSWINCE fflush(stdout); # endif -# ifdef LINT - /* Entry points we should be testing, but aren't. */ - /* Some can be tested by defining GC_DEBUG at the top of this file */ - /* This is a bit SunOS4 specific. */ - GC_noop(GC_expand_hp, GC_add_roots, GC_clear_roots, - GC_register_disappearing_link, - GC_register_finalizer_ignore_self, - GC_debug_register_displacement, GC_debug_change_stubborn, - GC_debug_end_stubborn_change, GC_debug_malloc_uncollectable, - GC_debug_free, GC_debug_realloc, - GC_generic_malloc_words_small, GC_init, - GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page, - GC_set_max_heap_size, GC_get_bytes_since_gc, - GC_get_total_bytes, GC_pre_incr, GC_post_incr); -# endif # ifdef MSWIN32 GC_win32_free_heap(); # endif -- 2.40.0