From 7e81c1dc0b62e11a38b92395595b30fe762ca60c Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 26 Oct 2016 01:07:33 +0300 Subject: [PATCH] Revert "Workaround 'suspicious ptr subtraction' cppcheck warning in gc_cpp" This reverts commit 363890b2ab8365dcc6b87a2a6c4752c1f710dcf2. Because the warning is still reported by the recent versions of cppcheck (as of Oct 2016). --- include/gc_cpp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gc_cpp.h b/include/gc_cpp.h index 8c9d054..b0ab260 100644 --- a/include/gc_cpp.h +++ b/include/gc_cpp.h @@ -432,7 +432,7 @@ inline gc_cleanup::gc_cleanup() if (base != 0) { // Don't call the debug version, since this is a real base address. GC_register_finalizer_ignore_self(base, (GC_finalization_proc) cleanup, - (void*) (((char*) this) - (char*) base), + (void*) ((char*) this - (char*) base), &oldProc, &oldData); if (oldProc != 0) { GC_register_finalizer_ignore_self(base, oldProc, oldData, 0, 0); -- 2.7.4