From: Ivan Maidanski Date: Thu, 17 Nov 2016 07:02:15 +0000 (+0300) Subject: Workaround 'operator delete[]/new[] never used' cppcheck false warning X-Git-Tag: v8.0.0~1031 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=791e75754acb358f8e11fe9968fa81adc49019f4;p=gc Workaround 'operator delete[]/new[] never used' cppcheck false warning * gc_cpp.cc [!_MSC_VER && GC_OPERATOR_NEW_ARRAY] (operator new[], operator delete[]): Do not define if CPPCHECK. --- diff --git a/gc_cpp.cc b/gc_cpp.cc index 6f25e336..185ec25a 100644 --- a/gc_cpp.cc +++ b/gc_cpp.cc @@ -53,7 +53,7 @@ built-in "new" and "delete". GC_FREE(obj); } -# ifdef GC_OPERATOR_NEW_ARRAY +# if defined(GC_OPERATOR_NEW_ARRAY) && !defined(CPPCHECK) void* operator new[](size_t size) GC_DECL_NEW_THROW { return GC_MALLOC_UNCOLLECTABLE(size); }