summaryrefslogtreecommitdiff
path: root/dbg_mlc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-11-23 11:49:31 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-11-23 11:49:31 +0300
commita613b15ce446f0926b9d0c5232ebd140bfdca9ec (patch)
tree878abde9a03eaa75b573814afe2717e33da47734 /dbg_mlc.c
parent20cfa75b7b552284c7ec201ed56a11be68a34dd7 (diff)
downloadbdwgc-a613b15ce446f0926b9d0c5232ebd140bfdca9ec.tar.gz
Workaround '*_stubborn function is never used' cppcheck warnings
* dbg_mlc.c (GC_debug_malloc_stubborn, GC_debug_change_stubborn): Do not define if CPPCHECK. * mallocx.c (GC_malloc_stubborn, GC_end_stubborn_change): Likewise. * include/gc.h (GC_debug_change_stubborn): Always mark as GC_ATTR_DEPRECATED (regardless of CPPCHECK). * tests/test.c [!PCR && !GC_WIN32_THREADS && !GC_PTHREADS && CPPCHECK] (main): Remove UNTESTED(GC_debug_change_stubborn).
Diffstat (limited to 'dbg_mlc.c')
-rw-r--r--dbg_mlc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/dbg_mlc.c b/dbg_mlc.c
index d09f309b..bf24aa35 100644
--- a/dbg_mlc.c
+++ b/dbg_mlc.c
@@ -619,13 +619,15 @@ STATIC void * GC_debug_generic_malloc(size_t lb, int knd, GC_EXTRA_PARAMS)
}
#endif /* DBG_HDRS_ALL */
-GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t lb, GC_EXTRA_PARAMS)
-{
+#ifndef CPPCHECK
+ GC_API void * GC_CALL GC_debug_malloc_stubborn(size_t lb, GC_EXTRA_PARAMS)
+ {
return GC_debug_malloc(lb, OPT_RA s, i);
-}
+ }
-GC_API void GC_CALL GC_debug_change_stubborn(
+ GC_API void GC_CALL GC_debug_change_stubborn(
const void * p GC_ATTR_UNUSED) {}
+#endif /* !CPPCHECK */
GC_API void GC_CALL GC_debug_end_stubborn_change(const void *p)
{