Remove lint-specific code
authorIvan Maidanski <ivmai@mail.ru>
Tue, 21 Mar 2017 21:37:06 +0000 (00:37 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 21 Mar 2017 21:38:56 +0000 (00:38 +0300)
Note: cppcheck and CSA replace lint tool.

* Makefile.direct (lint): Remove.
* dyn_load.c [SOLARISDL && !USE_PROC_FOR_LIBRARIES && LINT] (_DYNAMIC):
Remove.
* dyn_load.c [IRIX5 || (USE_PROC_FOR_LIBRARIES && !LINUX)]
(GC_register_dynamic_libraries): Remove comment about a false warning
reported by lint.
* mach_dep.c [ASM_CLEAR_CODE && LINT] (GC_clear_stack_inner): Remove.
* tests/test.c (typed_test): Call GC_make_descriptor unconditionally.
* tests/test.c (run_one_test): Set y to fail_proc1 unconditionally.
* tests/test.c (main): Do not check whether LINT is defined.

Makefile.direct
dyn_load.c
mach_dep.c
tests/test.c

index ef736e7..5785290 100644 (file)
@@ -433,9 +433,6 @@ gc.tar.Z: gc.tar
 gc.tar.gz: gc.tar
        gzip gc.tar
 
-lint: $(CSRCS) tests/test.c
-       lint -DLINT $(CSRCS) tests/test.c | egrep -v "possible pointer alignment problem|abort|exit|sbrk|mprotect|syscall|change in ANSI|improper alignment"
-
 # BTL: added to test shared library version of collector.
 # Currently works only under SunOS5.  Requires GC_INIT call from statically
 # loaded client code.
index 0520577..69f637c 100644 (file)
@@ -159,10 +159,6 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 0;
 
 #if defined(SOLARISDL) && !defined(USE_PROC_FOR_LIBRARIES)
 
-#ifdef LINT
-    Elf32_Dyn _DYNAMIC;
-#endif
-
 STATIC struct link_map *
 GC_FirstDLOpenedLinkMap(void)
 {
@@ -809,8 +805,6 @@ GC_INNER void GC_register_dynamic_libraries(void)
     if (fd < 0) {
       (void)snprintf(buf, sizeof(buf), "/proc/%ld", (long)getpid());
       buf[sizeof(buf) - 1] = '\0';
-        /* The above generates a lint complaint, since pid_t varies.    */
-        /* It's unclear how to improve this.                            */
       fd = open(buf, O_RDONLY);
       if (fd < 0) {
         ABORT("/proc open failed");
index 62b7a37..ccc1de6 100644 (file)
@@ -325,13 +325,3 @@ GC_INNER void GC_with_callee_saves_pushed(void (*fn)(ptr_t, void *),
   /* contents before we get a chance to look at them.           */
   GC_noop1((word)(&dummy));
 }
-
-#if defined(ASM_CLEAR_CODE)
-# ifdef LINT
-    ptr_t GC_clear_stack_inner(ptr_t arg, word limit)
-    {
-      return limit ? arg : 0; /* use both arguments */
-    }
-    /* The real version is in a .S file */
-# endif
-#endif /* ASM_CLEAR_CODE */
index 289312a..9fe1671 100644 (file)
@@ -1112,9 +1112,7 @@ void typed_test(void)
     GC_word * x = (GC_word *)GC_malloc_explicitly_typed(2000, d4);
     int i;
 
-#   ifndef LINT
-      (void)GC_make_descriptor(bm_large, 32);
-#   endif
+    (void)GC_make_descriptor(bm_large, 32);
     collectable_count++;
     if (GC_get_bit(bm_huge, 32) == 0 || GC_get_bit(bm_huge, 311) == 0
         || GC_get_bit(bm_huge, 319) != 0) {
@@ -1226,11 +1224,7 @@ void run_one_test(void)
 #   ifndef DBG_HDRS_ALL
         char *x;
         char **z;
-#       ifdef LINT
-            char *y = 0;
-#       else
-            char *y = (char *)(GC_word)fail_proc1;
-#       endif
+        char *y = (char *)(GC_word)fail_proc1;
 #   endif
     CLOCK_TYPE start_time;
     CLOCK_TYPE reverse_time;
@@ -1718,8 +1712,8 @@ void GC_CALLBACK warn_proc(char *msg, GC_word p)
 # define WINMAIN_LPTSTR LPSTR
 #endif
 
-#if !defined(PCR) && !defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS) \
-    || defined(LINT)
+#if !defined(PCR) && !defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)
+
 #if ((defined(MSWIN32) && !defined(__MINGW32__)) || defined(MSWINCE)) \
     && !defined(NO_WINMAIN_ENTRY)
   int APIENTRY WinMain(HINSTANCE instance GC_ATTR_UNUSED,
@@ -1926,7 +1920,7 @@ void GC_CALLBACK warn_proc(char *msg, GC_word p)
       return(0);
 #   endif
 }
-# endif
+# endif /* !GC_WIN32_THREADS && !GC_PTHREADS */
 
 #if defined(GC_WIN32_THREADS) && !defined(GC_PTHREADS)