From: Ivan Maidanski Date: Tue, 7 Mar 2017 15:52:08 +0000 (+0300) Subject: Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX) X-Git-Tag: v8.0.0~883 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18acb30bf2ba595f3d6a3187d2aea8d8892eb451;p=gc Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX) * include/private/gc_priv.h (BCOPY, BZERO): Define to memcpy/set if CPPCHECK (regardless of BCOPY_EXISTS). --- diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 02014477..d92591ed 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -476,7 +476,7 @@ typedef char * ptr_t; /* A generic pointer to which we can add */ # define BCOPY_EXISTS # endif -# ifndef BCOPY_EXISTS +# if !defined(BCOPY_EXISTS) || defined(CPPCHECK) # include # define BCOPY(x,y,n) memcpy(y, x, (size_t)(n)) # define BZERO(x,n) memset(x, 0, (size_t)(n))