summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-03-13 20:37:24 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:56 +0200
commit618a4c49d9c8c50e95f075e11e826aded68518cd (patch)
tree8c90cb5dd2fcf502fcdf9dde7f9ee6f5e6ad9276 /misc.c
parent667fb0512a70f7756a2c64f0e71c03e1e49a8a4c (diff)
2011-03-13 Ivan Maidanski <ivmai@mail.ru>
* dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj, GC_print_smashed_obj, GC_debug_free_inner): Add a code for a LINT-like tool to instruct it that the function is invoked only with valid parameters (otherwise a SEGV is ok); recognize LINT2 new macro. * misc.c (GC_abort): Instruct a LINT-like tool that the function never returns in fact. * os_dep.c (GC_linux_stack_base): Check for read buffer overflow; close the file immediately after read; use STRTOULL() instead of decoding the address number manually. * include/private/gc_priv.h (EXPECT): Don't specify outcome for a LINT-like tool. * include/private/gc_priv.h (GC_all_interior_pointers): Instruct a LINT-like tool that the value is restricted to zero and one only (required since the variable is global and its value is used as a part of array index expression is some places).
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index b4e47b8..b058228 100644
--- a/misc.c
+++ b/misc.c
@@ -1381,7 +1381,9 @@ GC_API GC_warn_proc GC_CALL GC_get_warn_proc(void)
/* about threads. */
for(;;) {}
}
- if (!msg) return; /* to suppress compiler warnings in ABORT callers. */
+# ifndef LINT2
+ if (!msg) return; /* to suppress compiler warnings in ABORT callers. */
+# endif
# if defined(MSWIN32) && defined(NO_DEBUGGING)
/* A more user-friendly abort after showing fatal message. */
_exit(-1); /* exit on error without running "at-exit" callbacks */