{"id":292539,"date":"2019-07-25T09:04:03","date_gmt":"2019-07-25T09:04:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=292539"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=292539","title":{"rendered":"\ufeff\u041a\u0430\u043a \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0432 \u043d\u043e\u0433\u0443 \u0432 C \u0438 C++. \u0421\u0431\u043e\u0440\u043d\u0438\u043a \u0440\u0435\u0446\u0435\u043f\u0442\u043e\u0432 Haiku OS"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio \u0441 \u043a\u043e\u0434\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Haiku \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u0434\u0430\u043b\u0451\u043a\u0438\u0439 2015-\u0439 \u0433\u043e\u0434. \u042d\u0442\u043e \u0431\u044b\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439\u0448\u0438\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u043e\u0431\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442? \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f Linux \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0451 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u0433\u043e\u0434\u0430. \u041d\u043e \u0442\u0440\u0443\u0434\u044b \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u044b\u043b\u0438 \u0432\u043e\u0437\u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0435\u043d\u044b: \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 Haiku \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0431\u0430\u0437\u0443 \u0440\u0435\u0434\u043a\u0438\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434 Haiku \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3a8\/3b6\/925\/3a83b6925fff10cf8924920b96996e8d.png\" alt=\"Picture 3\"><\/div>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0413\u0435\u0440\u043e\u0438 \u043d\u0430\u0448\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u2014 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 <a href=\"https:\/\/www.haiku-os.org\/\">Haiku<\/a> \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio-download\/\">PVS-Studio<\/a> \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u043e\u0432 C, C++, C# \u0438 Java. \u041a\u043e\u0433\u0434\u0430 4.5 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u043c\u044b \u0432\u0437\u044f\u043b\u0438\u0441\u044c \u0437\u0430 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0412\u0441\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430, \u0440\u0430\u0441\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438 \u0442.\u0434. \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <a href=\"https:\/\/www.viva64.com\/ru\/m\/0031\/\">Compiler Monitoring UI<\/a> \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C#, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044f\u043c\u0438 \u0431\u044b\u043b\u0430 \u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 Mono, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0432 Linux. \u0421\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442 Haiku \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u0440\u043e\u0441\u0441-\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438, \u043a\u0440\u043e\u043c\u0435 Windows. \u041e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0431\u043e\u0440\u043a\u0435 Haiku, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 Haiku \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0432 \u0441\u0431\u043e\u0440\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437 \u043c\u043e\u0436\u043d\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435. \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cpp\">cd \/opt git clone https:\/\/review.haiku-os.org\/buildtools git clone https:\/\/review.haiku-os.org\/haiku cd .\/haiku mkdir generated.x86_64; cd generated.x86_64 ..\/configure --distro-compatibility official -j12 \\   --build-cross-tools x86_64 ..\/..\/buildtools cd ..\/..\/buildtools\/jam make all cd \/opt\/haiku\/generated.x86_64 pvs-studio-analyzer trace -- \/opt\/buildtools\/jam\/bin.linuxx86\/jam \\   -q -j1 @nightly-anyboot pvs-studio-analyzer analyze -l \/mnt\/svn\/PVS-Studio.lic -r \/opt\/haiku \\    -C x86_64-unknown-haiku-gcc -o \/opt\/haiku\/haiku.log -j12<\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0441\u044f \u0432 Docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u043d\u043e\u0432\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435: <a href=\"https:\/\/www.viva64.com\/ru\/m\/0047\/\">\u0417\u0430\u043f\u0443\u0441\u043a PVS-Studio \u0432 Docker<\/a>. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<h2>\u041d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v614\/\">V614<\/a> Uninitialized variable &#8216;rval&#8217; used. fetch.c 1727  <\/p>\n<pre><code class=\"cpp\">int auto_fetch(int argc, char *argv[]) {   volatile int  argpos;   int    rval;                  \/\/ &lt;=   argpos = 0;    if (sigsetjmp(toplevel, 1)) {     if (connected)       disconnect(0, NULL);     if (rval &gt; 0)               \/\/ &lt;=       rval = argpos + 1;     return (rval);   }   .... }<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>rval <\/i> \u043d\u0435 \u0431\u044b\u043b\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0451 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0443. \u041f\u0440\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u043c \u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>rval <\/i> \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>auto_fetch<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v614\/\">V614<\/a> Uninitialized pointer &#8216;res&#8217; used. commands.c 2873  <\/p>\n<pre><code class=\"cpp\">struct addrinfo {  int ai_flags;  int ai_family;  int ai_socktype;  int ai_protocol;  socklen_t ai_addrlen;  char *ai_canonname;  struct sockaddr *ai_addr;  struct addrinfo *ai_next; };  static int sourceroute(struct addrinfo *ai, char *arg, char **cpp,             int *lenp, int *protop, int *optp) {   static char buf[1024 + ALIGNBYTES];   char *cp, *cp2, *lsrp, *ep;   struct sockaddr_in *_sin; #ifdef INET6   struct sockaddr_in6 *sin6;   struct ip6_rthdr *rth; #endif   struct addrinfo hints, *res;     \/\/ &lt;=   int error;   char c;    if (cpp == NULL || lenp == NULL)     return -1;   if (*cpp != NULL) {     switch (res-&gt;ai_family) {      \/\/ &lt;=     case AF_INET:       if (*lenp &lt; 7)         return -1;       break;       ....     }   }   .... }<\/code><\/pre>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0434\u0435\u0441\u044c \u0438\u043c\u0435\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>res<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v506\/\">V506<\/a> Pointer to local variable &#8216;normalized&#8217; is stored outside the scope of this variable. Such a pointer will become invalid. TextView.cpp 5596  <\/p>\n<pre><code class=\"cpp\">void BTextView::_ApplyStyleRange(...., const BFont* font, ....) {   if (font != NULL) {     BFont normalized = *font;     _NormalizeFont(&amp;normalized);     font = &amp;normalized;   }   ....   fStyles-&gt;SetStyleRange(fromOffset, toOffset, fText-&gt;Length(), mode,     font, color); }<\/code><\/pre>\n<p>  \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e. \u041d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>font <\/i> \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 <i>normalized<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0440\u0443\u0448\u0435\u043d \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v603\/\">V603<\/a> The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 27  <\/p>\n<pre><code class=\"cpp\">int8 BUnicodeChar::Type(uint32 c) {   BUnicodeChar();   return u_charType(c); }<\/code><\/pre>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0440\u0435\u0434\u0438 C++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u044f\u043a\u043e\u0431\u044b \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\/\u043e\u0431\u043d\u0443\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u0430, \u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043d\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0443\u0442 \u0436\u0435 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0435\u0442\u0441\u044f. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e:<\/p>\n<ul>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 37<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 49<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 58<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 67<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 77<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 89<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 103<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 115<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 126<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 142<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 152<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 163<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 186<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 196<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 206<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 214<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 222<\/li>\n<li>V603 The object was created but it is not being used. If you wish to call constructor, &#8216;this-&gt;BUnicodeChar::BUnicodeChar(&#8230;.)&#8217; should be used. UnicodeChar.cpp 230<\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v670\/\">V670<\/a> The uninitialized class member &#8216;fPatternHandler&#8217; is used to initialize the &#8216;fInternal&#8217; member. Remember that members are initialized in the order of their declarations inside a class. Painter.cpp 184  <\/p>\n<pre><code class=\"cpp\">Painter::Painter()   :   fInternal(fPatternHandler),   ....   fPatternHandler(),   .... {   .... };  class Painter {   .... private:   mutable PainterAggInterface fInternal; \/\/ line 336    bool fSubpixelPrecise : 1;   bool fValidClipping : 1;   bool fDrawingText : 1;   bool fAttached : 1;   bool fIdentityTransform : 1;    Transformable fTransform;   float fPenSize;   const BRegion* fClippingRegion;   drawing_mode fDrawingMode;   source_alpha fAlphaSrcMode;   alpha_function fAlphaFncMode;   cap_mode fLineCapMode;   join_mode fLineJoinMode;   float fMiterLimit;    PatternHandler fPatternHandler;        \/\/ line 355   mutable AGGTextRenderer fTextRenderer; };<\/code><\/pre>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043f\u043e\u043b\u0435 <i>fInternal<\/i> \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <i>fPatternHandler<\/i>.<\/p>\n<h2>\u041f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 #define<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v523\/\">V523<\/a> The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. subr_gtaskqueue.c 191  <\/p>\n<pre><code class=\"cpp\">#define  TQ_LOCK(tq)              \\   do {                \\     if ((tq)-&gt;tq_spin)          \\       mtx_lock_spin(&amp;(tq)-&gt;tq_mutex);      \\     else              \\       mtx_lock(&amp;(tq)-&gt;tq_mutex);      \\   } while (0) #define  TQ_ASSERT_LOCKED(tq)  mtx_assert(&amp;(tq)-&gt;tq_mutex, MA_OWNED)  #define  TQ_UNLOCK(tq)              \\   do {                \\     if ((tq)-&gt;tq_spin)          \\       mtx_unlock_spin(&amp;(tq)-&gt;tq_mutex);    \\     else              \\       mtx_unlock(&amp;(tq)-&gt;tq_mutex);      \\   } while (0)  void grouptask_block(struct grouptask *grouptask) {   ....   TQ_LOCK(queue);   gtask-&gt;ta_flags |= TASK_NOENQUEUE;   gtaskqueue_drain_locked(queue, gtask);   TQ_UNLOCK(queue); }<\/code><\/pre>\n<p>  \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u0448\u044c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430:  <\/p>\n<pre><code class=\"cpp\">void grouptask_block(struct grouptask *grouptask) {   ....   do { if ((queue)-&gt;tq_spin) mtx_lock(&amp;(queue)-&gt;tq_mutex);        else mtx_lock(&amp;(queue)-&gt;tq_mutex); } while (0);   gtask-&gt;ta_flags |= 0x4;   gtaskqueue_drain_locked(queue, gtask);    do { if ((queue)-&gt;tq_spin) mtx_unlock(&amp;(queue)-&gt;tq_mutex);         else mtx_unlock(&amp;(queue)-&gt;tq_mutex); } while (0); }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0430\u0432 \u2014 \u0432\u0435\u0442\u0432\u0438 <i>if <\/i> \u0438 <i>else <\/i> \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b. \u041d\u043e \u043a\u0443\u0434\u0430 \u0434\u0435\u043b\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>mtx_lock_spin<\/i> \u0438 <i>mtx_unlock_spin<\/i>? \u041c\u0430\u043a\u0440\u043e\u0441\u044b <i>TQ_LOCK<\/i>, <i>TQ_UNLOCK<\/i> \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>grouptask_block<\/i> \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u044f\u0434\u043e\u043c, \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0433\u0434\u0435-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043f\u043e\u0434\u043c\u0435\u043d\u0430.<\/p>\n<p>  \u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430\u0448\u0451\u043b \u0442\u043e\u043b\u044c\u043a\u043e <i>mutex.h<\/i> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:  <\/p>\n<pre><code class=\"cpp\">\/* on FreeBSD these are different functions *\/ #define mtx_lock_spin(x)   mtx_lock(x) #define mtx_unlock_spin(x) mtx_unlock(x)<\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043b\u0438 \u0442\u0430\u043a\u0430\u044f \u043f\u043e\u0434\u043c\u0435\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442 \u2014 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u042f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 Linux, \u0438 \u0442\u0430\u043a\u0430\u044f \u043f\u043e\u0434\u043c\u0435\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043c\u043d\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439.<\/p>\n<h2>\u041e\u0448\u0438\u0431\u043a\u0438 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 free<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v575\/\">V575<\/a> The null pointer is passed into &#8216;free&#8217; function. Inspect the first argument. setmime.cpp 727  <\/p>\n<pre><code class=\"cpp\">void MimeType::_PurgeProperties() {   fShort.Truncate(0);   fLong.Truncate(0);   fPrefApp.Truncate(0);   fPrefAppSig.Truncate(0);   fSniffRule.Truncate(0);    delete fSmallIcon;   fSmallIcon = NULL;    delete fBigIcon;   fBigIcon = NULL;    fVectorIcon = NULL;            \/\/ &lt;=   free(fVectorIcon);             \/\/ &lt;=    fExtensions.clear();   fAttributes.clear(); }<\/code><\/pre>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <i>free <\/i> \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u044f\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435. \u0422\u0430\u043a, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0451\u043b \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e <i>fVectorIcon<\/i>, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c <i>NULL<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v575\/\">V575<\/a> The null pointer is passed into &#8216;free&#8217; function. Inspect the first argument. driver_settings.cpp 461  <\/p>\n<pre><code class=\"cpp\">static settings_handle * load_driver_settings_from_file(int file, const char *driverName) {   ....   handle = new_settings(text, driverName);   if (handle != NULL) {     \/\/ everything went fine!     return handle;   }    free(handle);           \/\/ &lt;=   .... }<\/code><\/pre>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u044f\u0432\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <i>free<\/i>. \u042d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0442.\u043a. \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v575\/\">V575<\/a> The null pointer is passed into &#8216;free&#8217; function. Inspect the first argument. PackageFileHeapWriter.cpp 166  <\/p>\n<pre><code class=\"cpp\">void* _GetBuffer() {   ....   void* buffer = malloc(fBufferSize);   if (buffer == NULL &amp;&amp; !fBuffers.AddItem(buffer)) {     free(buffer);     throw std::bad_alloc();   }   return buffer; }<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0443\u0442 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430. \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 &amp;&amp; \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 ||. \u0422\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0431\u0440\u043e\u0448\u0435\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <i>std::bad_alloc()<\/i>, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>malloc<\/i>.<\/p>\n<h2>\u041e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c delete<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v611\/\">V611<\/a> The memory was allocated using &#8216;new T[]&#8217; operator but was released using the &#8216;delete&#8217; operator. Consider inspecting this code. It&#8217;s probably better to use &#8216;delete [] fMsg;&#8217;. Err.cpp 65  <\/p>\n<pre><code class=\"cpp\">class Err { public:  .... private:  char *fMsg;  ssize_t fPos; };  void Err::Unset() {  delete fMsg;                                   \/\/ &lt;=  fMsg = __null;  fPos = -1; }  void Err::SetMsg(const char *msg) {  if (fMsg) {   delete fMsg;                                  \/\/ &lt;=   fMsg = __null;  }  if (msg) {   fMsg = new(std::nothrow) char[strlen(msg)+1]; \/\/ &lt;=   if (fMsg)    strcpy(fMsg, msg);  } }<\/code><\/pre>\n<p>  \u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>fMsg <\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043b\u044f \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>delete<\/i>, \u0432\u043c\u0435\u0441\u0442\u043e <i>delete[]<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v611\/\">V611<\/a> The memory was allocated using &#8216;new&#8217; operator but was released using the &#8216;free&#8217; function. Consider inspecting operation logics behind the &#8216;wrapperPool&#8217; variable. vm_page.cpp 3080  <\/p>\n<pre><code class=\"cpp\">status_t vm_page_write_modified_page_range(....) {   ....   PageWriteWrapper* wrapperPool     = new(malloc_flags(allocationFlags)) PageWriteWrapper[maxPages + 1];   PageWriteWrapper** wrappers     = new(malloc_flags(allocationFlags)) PageWriteWrapper*[maxPages];   if (wrapperPool == NULL || wrappers == NULL) {     free(wrapperPool);                              \/\/ &lt;=     free(wrappers);                                 \/\/ &lt;=     wrapperPool = stackWrappersPool;     wrappers = stackWrappers;     maxPages = 1;   }   .... }<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c <i>malloc_flags<\/i> \u2013 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0430\u0435\u0442 <i>malloc<\/i>. \u0418 \u0437\u0430\u0442\u0435\u043c \u0443\u0436\u0435 <i>placement-new<\/i> \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u0442 \u0437\u0434\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u043a\u0442. \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043b\u0430\u0441\u0441 <i>PageWriteWrapper<\/i> \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"cpp\">class PageWriteWrapper { public:  PageWriteWrapper();  ~PageWriteWrapper();  void SetTo(vm_page* page);  bool Done(status_t result);  private:  vm_page* fPage;  struct VMCache* fCache;  bool fIsActive; };  PageWriteWrapper::PageWriteWrapper()  :  fIsActive(false) { }  PageWriteWrapper::~PageWriteWrapper() {  if (fIsActive)   panic(\"page write wrapper going out of scope but isn't completed\"); }<\/code><\/pre>\n<p>  \u0442\u043e \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>free <\/i> \u0434\u043b\u044f \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v611\/\">V611<\/a> The memory was allocated using &#8216;new T[]&#8217; operator but was released using the &#8216;delete&#8217; operator. Consider inspecting this code. It&#8217;s probably better to use &#8216;delete [] fOutBuffer;&#8217;. Check lines: 26, 45. PCL6Rasterizer.h 26  <\/p>\n<pre><code class=\"cpp\">class PCL6Rasterizer : public Rasterizer { public:   ....   ~PCL6Rasterizer()   {     delete fOutBuffer;     fOutBuffer = NULL;   }   ....   virtual void InitializeBuffer()   {     fOutBuffer = new uchar[fOutBufferSize];   } private:   uchar* fOutBuffer;   int    fOutBufferSize; };<\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>delete <\/i> \u0432\u043c\u0435\u0441\u0442\u043e <i>delete[]<\/i> \u2014 \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u041b\u0435\u0433\u0447\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430, \u0442.\u043a. \u043a\u043e\u0434 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u043c\u0435\u0441\u0442 \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438. \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c \u0432 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e <i>fOutBuffer<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v772\/\">V772<\/a> Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. Hashtable.cpp 207  <\/p>\n<pre><code class=\"cpp\">void Hashtable::MakeEmpty(int8 keyMode,int8 valueMode) {   ....   for (entry = fTable[index]; entry; entry = next) {     switch (keyMode) {       case HASH_EMPTY_DELETE:         \/\/ TODO: destructors are not called!         delete (void*)entry-&gt;key;         break;       case HASH_EMPTY_FREE:         free((void*)entry-&gt;key);         break;     }     switch (valueMode) {       case HASH_EMPTY_DELETE:         \/\/ TODO: destructors are not called!         delete entry-&gt;value;         break;       case HASH_EMPTY_FREE:         free(entry-&gt;value);         break;     }     next = entry-&gt;next;     delete entry;   }   .... }<\/code><\/pre>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 <i>delete<\/i>\/<i>delete[]<\/i> \u0438 <i>free<\/i>, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0435\u0449\u0451 \u043e\u0434\u043d\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u2014 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e \u043d\u0430 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0442\u0438\u043f <i>(void*)<\/i>.<\/p>\n<h2>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0435\u0437 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v591\/\">V591<\/a> Non-void function should return a value. Referenceable.h 228  <\/p>\n<pre><code class=\"cpp\">BReference&amp; operator=(const BReference&lt;const Type&gt;&amp; other) {   fReference = other.fReference; }<\/code><\/pre>\n<p>  \u0412 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u043c.<\/p>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430\u0445 \u043a\u043e\u0434\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430:<\/p>\n<ul>\n<li>V591 Non-void function should return a value. Referenceable.h 233<\/li>\n<li>V591 Non-void function should return a value. Referenceable.h 239<\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v591\/\">V591<\/a> Non-void function should return a value. main.c 1010  <\/p>\n<pre><code class=\"cpp\">void errx(int, const char *, ...) ;  char * getoptionvalue(const char *name) {   struct option *c;    if (name == NULL)     errx(1, \"getoptionvalue() invoked with NULL name\");   c = getoption(name);   if (c != NULL)     return (c-&gt;value);   errx(1, \"getoptionvalue() invoked with unknown option '%s'\", name);   \/* NOTREACHED *\/ }<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 NOTREACHED \u0437\u0434\u0435\u0441\u044c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u0430\u043a noreturn. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 noreturn-\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b: \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0442\u0430\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0438\u043f\u0430\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0430\u0440\u043d\u0438\u043d\u0433\u043e\u0432. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0442\u043e\u0436\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<h2>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v596\/\">V596<\/a> The object was created but it is not being used. The &#8216;throw&#8217; keyword could be missing: throw ParseException(FOO); Response.cpp 659  <\/p>\n<pre><code class=\"cpp\">size_t Response::ExtractNumber(BDataIO&amp; stream) {   BString string = ExtractString(stream);    const char* end;   size_t number = strtoul(string.String(), (char**)&amp;end, 10);   if (end == NULL || end[0] != '\\0')     ParseException(\"Invalid number!\");    return number; }<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0437\u0430\u0431\u044b\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>throw<\/i>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <i>ParseException <\/i> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043a\u0430\u043a \u043d\u0438 \u0432 \u0447\u0451\u043c \u043d\u0435 \u0431\u044b\u0432\u0430\u043b\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v1022\/\">V1022<\/a> An exception was thrown by pointer. Consider throwing it by value instead. gensyscallinfos.cpp 316  <\/p>\n<pre><code class=\"cpp\">int main(int argc, char** argv) {   try {     return Main().Run(argc, argv);   } catch (Exception&amp; exception) {                                         \/\/ &lt;=     fprintf(stderr, \"%s\\n\", exception.what());     return 1;   } }  int Run(int argc, char** argv) {   ....   _ParseSyscalls(argv[1]);   .... }  void _ParseSyscalls(const char* filename) {   ifstream file(filename, ifstream::in);   if (!file.is_open())     throw new IOException(string(\"Failed to open '\") + filename + \"'.\");   \/\/ &lt;=   .... }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <i>IOException<\/i>, \u0431\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0435 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e. \u0411\u0440\u043e\u0441\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0439\u043c\u0430\u043d\u043e, \u0442\u0430\u043a \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0422\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432\u044b\u043d\u0443\u0436\u0434\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>delete<\/i> \u0434\u043b\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0447\u0442\u043e \u0442\u043e\u0436\u0435 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e.<\/p>\n<p>  \u0415\u0449\u0451 \u0434\u0432\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u0430 \u043a\u043e\u0434\u0430:<\/p>\n<ul>\n<li>V1022 An exception was thrown by pointer. Consider throwing it by value instead. gensyscallinfos.cpp 347<\/li>\n<li>V1022 An exception was thrown by pointer. Consider throwing it by value instead. gensyscallinfos.cpp 413<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043ec\u0442\u044c<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v597\/\">V597<\/a> The compiler could delete the &#8216;memset&#8217; function call, which is used to flush &#8216;f_key&#8217; object. The memset_s() function should be used to erase the private data. dst_api.c 1018  <\/p>\n<pre><code class=\"cpp\">#ifndef SAFE_FREE #define SAFE_FREE(a) \\ do{if(a != NULL){memset(a,0, sizeof(*a)); free(a); a=NULL;}} while (0) .... #endif  DST_KEY * dst_free_key(DST_KEY *f_key) {   if (f_key == NULL)     return (f_key);   if (f_key-&gt;dk_func &amp;&amp; f_key-&gt;dk_func-&gt;destroy)     f_key-&gt;dk_KEY_struct =       f_key-&gt;dk_func-&gt;destroy(f_key-&gt;dk_KEY_struct);   else {     EREPORT((\"dst_free_key(): Unknown key alg %d\\n\",        f_key-&gt;dk_alg));   }   if (f_key-&gt;dk_KEY_struct) {     free(f_key-&gt;dk_KEY_struct);     f_key-&gt;dk_KEY_struct = NULL;   }   if (f_key-&gt;dk_key_name)     SAFE_FREE(f_key-&gt;dk_key_name);   SAFE_FREE(f_key);   return (NULL); }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043c\u0430\u043a\u0440\u043e\u0441 <i>SAFE_FREE<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u044b\u0437\u043e\u0432\u044b <i>memset<\/i>, <i>free<\/i> \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 <i>NULL<\/i>, \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u0434 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435, \u0442.\u043a. \u0432\u0441\u0451 \u044d\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c \u0443\u0436\u0435 \u043f\u0440\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 <i>O2<\/i>.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u043e \u043d\u0435 \u0447\u0442\u043e \u0438\u043d\u043e\u0435, \u043a\u0430\u043a <a href=\"https:\/\/cwe.mitre.org\/data\/definitions\/14.html\">CWE-14<\/a>: Compiler Removal of Code to Clear Buffers.<\/p>\n<p>  \u0412\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0435\u0441\u0442, \u0433\u0434\u0435 \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f:<\/p>\n<ul>\n<li>V597 The compiler could delete the &#8216;memset&#8217; function call, which is used to flush &#8216;encoded_block&#8217; buffer. The memset_s() function should be used to erase the private data. dst_api.c 446<\/li>\n<li>V597 The compiler could delete the &#8216;memset&#8217; function call, which is used to flush &#8216;key_st&#8217; object. The memset_s() function should be used to erase the private data. dst_api.c 685<\/li>\n<li>V597 The compiler could delete the &#8216;memset&#8217; function call, which is used to flush &#8216;in_buff&#8217; buffer. The memset_s() function should be used to erase the private data. dst_api.c 916<\/li>\n<li>V597 The compiler could delete the &#8216;memset&#8217; function call, which is used to flush &#8216;ce&#8217; object. The memset_s() function should be used to erase the private data. fs_cache.c 1078<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v547\/\">V547<\/a> Expression &#8216;remaining &lt; 0&#8217; is always false. Unsigned type value is never &lt; 0. DwarfFile.cpp 1947  <\/p>\n<pre><code class=\"cpp\">status_t DwarfFile::_UnwindCallFrame(....) {   ....   uint64 remaining = lengthOffset + length - dataReader.Offset();   if (remaining &lt; 0)     return B_BAD_DATA;   .... }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u044f\u0432\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>remaining <\/i> \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0443\u043b\u0451\u043c \u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v547\/\">V547<\/a> Expression &#8216;sleep((unsigned) secs) &lt; 0&#8217; is always false. Unsigned type value is never &lt; 0. misc.cpp 56  <\/p>\n<pre><code class=\"cpp\">status_t snooze(bigtime_t amount) {   if (amount &lt;= 0)     return B_OK;    int64 secs = amount \/ 1000000LL;   int64 usecs = amount % 1000000LL;   if (secs &gt; 0) {     if (sleep((unsigned)secs) &lt; 0)     \/\/ &lt;=       return errno;   }    if (usecs &gt; 0) {     if (usleep((useconds_t)usecs) &lt; 0)       return errno;   }    return B_OK; }<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0432 \u0447\u0451\u043c \u043e\u0448\u0438\u0431\u043a\u0430, \u043e\u0431\u0440\u0430\u0442\u0438\u043c\u0441\u044f \u043a \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <i>sleep <\/i> \u0438 <i>usleep<\/i>:  <\/p>\n<pre><code class=\"cpp\">extern unsigned int sleep (unsigned int __seconds); extern int usleep (__useconds_t __useconds);<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>sleep <\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438 \u0435\u0451 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u043a\u043e\u0434\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c.<\/p>\n<h2>\u041e\u043f\u0430\u0441\u043d\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v774\/\">V774<\/a> The &#8216;device&#8217; pointer was used after the memory was released. xhci.cpp 1572  <\/p>\n<pre><code class=\"cpp\">void XHCI::FreeDevice(Device *device) {   uint8 slot = fPortSlots[device-&gt;HubPort()];   TRACE(\"FreeDevice() port %d slot %d\\n\", device-&gt;HubPort(), slot);    \/\/ Delete the device first, so it cleans up its pipes and tells us   \/\/ what we need to destroy before we tear down our internal state.   delete device;    DisableSlot(slot);   fDcba-&gt;baseAddress[slot] = 0;   fPortSlots[device-&gt;HubPort()] = 0;            \/\/ &lt;=   delete_area(fDevices[slot].trb_area);   delete_area(fDevices[slot].input_ctx_area);   delete_area(fDevices[slot].device_ctx_area);    memset(&amp;fDevices[slot], 0, sizeof(xhci_device));   fDevices[slot].state = XHCI_STATE_DISABLED; }<\/code><\/pre>\n<p>  \u041d\u0435\u043a\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 <i>device <\/i> \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c <i>delete<\/i>. \u042d\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <i>FreeDevice<\/i>. \u041d\u043e, \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0434\u043b\u044f \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435 \u0441\u043d\u043e\u0432\u0430 \u0435\u0441\u0442\u044c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0443\u0436\u0435 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443.<\/p>\n<p>  \u0422\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u043e\u043f\u0430\u0441\u043d\u044b\u043c \u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<ul>\n<li>V774 The &#8216;self&#8217; pointer was used after the memory was released. TranslatorRoster.cpp 884<\/li>\n<li>V774 The &#8216;string&#8217; pointer was used after the memory was released. RemoteView.cpp 1269<\/li>\n<li>V774 The &#8216;bs&#8217; pointer was used after the memory was released. mkntfs.c 4291<\/li>\n<li>V774 The &#8216;bs&#8217; pointer was used after the memory was released. mkntfs.c 4308<\/li>\n<li>V774 The &#8216;al&#8217; pointer was used after the memory was reallocated. inode.c 1155<\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v522\/\">V522<\/a> Dereferencing of the null pointer &#8216;data&#8217; might take place. The null pointer is passed into &#8216;malo_hal_send_helper&#8217; function. Inspect the third argument. Check lines: 350, 394. if_malohal.c 350  <\/p>\n<pre><code class=\"cpp\">static int malo_hal_fwload_helper(struct malo_hal *mh, char *helper) {   ....   \/* tell the card we're done and... *\/   error = malo_hal_send_helper(mh, 0, NULL, 0, MALO_NOWAIT); \/\/ &lt;= NULL   .... }  static int malo_hal_send_helper(struct malo_hal *mh, int bsize,     const void *data, size_t dsize, int waitfor) {   mh-&gt;mh_cmdbuf[0] = htole16(MALO_HOSTCMD_CODE_DNLD);   mh-&gt;mh_cmdbuf[1] = htole16(bsize);   memcpy(&amp;mh-&gt;mh_cmdbuf[4], data , dsize);                   \/\/ &lt;= data   .... }<\/code><\/pre>\n<p>  \u041c\u0435\u0436\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f <i>NULL <\/i> \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>data<\/i> \u0441 \u0442\u0430\u043a\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>memcpy<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v773\/\">V773<\/a> The function was exited without releasing the &#8216;inputFileFile&#8217; pointer. A memory leak is possible. command_recompress.cpp 119  <\/p>\n<pre><code class=\"cpp\">int command_recompress(int argc, const char* const* argv) {   ....   BFile* inputFileFile = new BFile;   error = inputFileFile-&gt;SetTo(inputPackageFileName, O_RDONLY);   if (error != B_OK) {     fprintf(stderr, \"Error: Failed to open input file \\\"%s\\\": %s\\n\",       inputPackageFileName, strerror(error));     return 1;   }   inputFile = inputFileFile;   .... }<\/code><\/pre>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/b\/0543\/\">PVS-Studio \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438<\/a>. \u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f <i>inputFileFile<\/i> \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u0442\u043e-\u0442\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u0438 \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0430\u043a. \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u2014 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u043a \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v595\/\">V595<\/a> The &#8216;fReply&#8217; pointer was utilized before it was verified against nullptr. Check lines: 49, 52. ReplyBuilder.cpp 49  <\/p>\n<pre><code class=\"cpp\">RPC::CallbackReply* ReplyBuilder::Reply() {   fReply-&gt;Stream().InsertUInt(fStatusPosition, _HaikuErrorToNFS4(fStatus));   fReply-&gt;Stream().InsertUInt(fOpCountPosition, fOpCount);    if (fReply == NULL || fReply-&gt;Stream().Error() == B_OK)     return fReply;   else     return NULL; }<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0436\u0435 \u0447\u0430\u0441\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u044e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0435\u0440\u0435\u0434 \u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439. \u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 <a href=\"https:\/\/www.viva64.com\/ru\/w\/v595\/\">V595<\/a> \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0438\u0434\u0435\u0440 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <i>fReply<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v595\/\">V595<\/a> The &#8216;mq&#8217; pointer was utilized before it was verified against nullptr. Check lines: 782, 786. oce_queue.c 782  <\/p>\n<pre><code class=\"cpp\">static void oce_mq_free(struct oce_mq *mq) {   POCE_SOFTC sc = (POCE_SOFTC) mq-&gt;parent;   struct oce_mbx mbx;   struct mbx_destroy_common_mq *fwcmd;    if (!mq)     return;   .... }<\/code><\/pre>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>mg <\/i> \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a \u0440\u0430\u043d\u0435\u0435, \u0447\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u043e\u0445\u043e\u0436\u0438\u0445 \u043c\u0435\u0441\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043d\u043e\u0433\u043e. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u0442\u0430\u0442\u044c\u044e \u0432\u043e\u0448\u043b\u043e \u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043e\u0442\u0447\u0451\u0442\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h2>\u0420\u0430\u0437\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/h2>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v645\/\">V645<\/a> The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 101  <\/p>\n<pre><code class=\"cpp\">static void dump_acpi_namespace(acpi_ns_device_info *device, char *root, int indenting) {   char output[320];   char tabs[255] = \"\";   ....   strlcat(tabs, \"|--- \", sizeof(tabs));   ....   while (....) {     uint32 type = device-&gt;acpi-&gt;get_object_type(result);     snprintf(output, sizeof(output), \"%s%s\", tabs, result + depth);     switch(type) {       case ACPI_TYPE_INTEGER:         strncat(output, \"     INTEGER\", sizeof(output));         break;       case ACPI_TYPE_STRING:         strncat(output, \"     STRING\", sizeof(output));         break;       ....     }     ....   }   .... }<\/code><\/pre>\n<p>  \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 <i>strlcat <\/i> \u0438 <i>strncat <\/i> \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443, \u043f\u043b\u043e\u0445\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u043c\u0443 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <i>strlcat <\/i> \u0442\u0440\u0435\u0442\u044c\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 <b>\u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430<\/b>, \u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>strncat <\/i> \u2014 <b>\u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440\u0435<\/b>, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u044e\u0442 \u0438\u043b\u0438 \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043e\u0431 \u044d\u0442\u043e\u043c. \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>strncat <\/i> \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432\u0441\u0435\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0431\u0443\u0444\u0435\u0440\u0430, \u0442.\u043a. \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <i>strlcat <\/i> \u043b\u0438\u0448\u0435\u043d\u0430 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043d\u043e \u0434\u043b\u044f \u0435\u0451 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043b\u044c.<\/p>\n<p>  \u0412\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438:<\/p>\n<ul>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 104<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 107<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 110<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 113<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 118<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 119<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 120<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 123<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 126<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 129<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 132<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 135<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 138<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 141<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;output&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. NamespaceDump.cpp 144<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;features_string&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. VirtioDevice.cpp 283<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;features_string&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. VirtioDevice.cpp 284<\/li>\n<li>V645 The &#8216;strncat&#8217; function call could lead to the &#8216;features_string&#8217; buffer overflow. The bounds should not contain the size of the buffer, but a number of characters it can hold. VirtioDevice.cpp 285<\/li>\n<\/ul>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v792\/\">V792<\/a> The &#8216;SetDecoratorSettings&#8217; function located to the right of the operator &#8216;|&#8217; will be called regardless of the value of the left operand. Perhaps, it is better to use &#8216;||&#8217;. DesktopListener.cpp 324  <\/p>\n<pre><code class=\"cpp\">class DesktopListener : public DoublyLinkedListLinkImpl&lt;DesktopListener&gt; { public:  ....  virtual bool SetDecoratorSettings(Window* window,          const BMessage&amp; settings) = 0;  .... };  bool DesktopObservable::SetDecoratorSettings(Window* window,   const BMessage&amp; settings) {   if (fWeAreInvoking)     return false;   InvokeGuard invokeGuard(fWeAreInvoking);    bool changed = false;   for (DesktopListener* listener = fDesktopListenerList.First();     listener != NULL; listener = fDesktopListenerList.GetNext(listener))     changed = changed | listener-&gt;SetDecoratorSettings(window, settings);    return changed; }<\/code><\/pre>\n<p>  \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432 \u043a\u043e\u0434\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b &#8216;|&#8217; \u0438 &#8216;||&#8217;. \u0422\u0430\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043b\u0438\u0448\u043d\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u0430\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>SetDecoratorSettings<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v627\/\">V627<\/a> Consider inspecting the expression. The argument of sizeof() is the macro which expands to a number. device.c 72  <\/p>\n<pre><code class=\"cpp\">#define PCI_line_size 0x0c \/* (1 byte) cache line size in 32 bit words *\/  static status_t wb840_open(const char* name, uint32 flags, void** cookie) {   ....   data-&gt;wb_cachesize = gPci-&gt;read_pci_config(data-&gt;pciInfo-&gt;bus,     data-&gt;pciInfo-&gt;device, data-&gt;pciInfo-&gt;function, PCI_line_size,     sizeof(PCI_line_size)) &amp; 0xff;   .... }<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>sizeof <\/i> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <i>0x0c<\/i> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u043a\u043e\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <i>data<\/i>.<\/p>\n<p>  <a href=\"https:\/\/www.viva64.com\/ru\/w\/v562\/\">V562<\/a> It&#8217;s odd to compare a bool type value with a value of 18: 0x12 == IsProfessionalSpdif(). CEchoGals_mixer.cpp 533  <\/p>\n<pre><code class=\"cpp\">typedef bool BOOL;  virtual BOOL IsProfessionalSpdif() { ... }  #define ECHOSTATUS_DSP_DEAD 0x12  ECHOSTATUS CEchoGals::ProcessMixerFunction(....) {   ....   if ( ECHOSTATUS_DSP_DEAD == IsProfessionalSpdif() ) \/\/ &lt;=   {     Status = ECHOSTATUS_DSP_DEAD;   }   else   {     pMixerFunction-&gt;Data.bProfSpdif = IsProfessionalSpdif();   }   .... }<\/code><\/pre>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <i>IsProfessionalSpdif <\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 <i>bool<\/i>, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0447\u0438\u0441\u043b\u043e\u043c <i>0x12<\/i>.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041c\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0432\u044b\u043f\u0443\u0441\u043a \u043f\u0435\u0440\u0432\u043e\u0439 \u0431\u0435\u0442\u044b Haiku \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043e\u0441\u0435\u043d\u044c\u044e, \u0442.\u043a. \u0431\u044b\u043b\u0438 \u0437\u0430\u043d\u044f\u0442\u044b \u0432\u044b\u043f\u0443\u0441\u043a\u043e\u043c PVS-Studio \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u0430 Java. \u041d\u043e \u043f\u0440\u0438\u0440\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0442\u0430\u043a\u043e\u0432\u0430, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u0432\u0430\u044e\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0438\u0445 \u043d\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0443\u0434\u0435\u043b\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u043a\u043e\u0434\u0430. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/scan.coverity.com\/projects\/haiku-32bit\">Coverity Scan<\/a>, \u043d\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u044b\u043b \u043f\u043e\u0447\u0442\u0438 \u0434\u0432\u0430 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434. \u042d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0433\u043e\u0440\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Haiku. \u0425\u043e\u0442\u044f \u0430\u043d\u0430\u043b\u0438\u0437 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Coverity \u0431\u044b\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0432 2014 \u0433\u043e\u0434\u0443, \u043d\u0430\u043c \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u043b\u043e \u0432 2015 \u0433\u043e\u0434\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0432\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 \u043e\u0431\u0437\u043e\u0440\u0430\u043c\u0438 \u043e\u0448\u0438\u0431\u043e\u043a (<a href=\"https:\/\/www.viva64.com\/ru\/b\/0317\/\">\u0447\u0430\u0441\u0442\u044c 1<\/a>, <a href=\"https:\/\/www.viva64.com\/ru\/b\/0318\/\">\u0447\u0430\u0441\u0442\u044c 2<\/a>).<\/p>\n<p>  \u0422\u0435\u0445, \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e \u043a\u043e\u043d\u0446\u0430, \u0436\u0434\u0451\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043e\u0431\u0437\u043e\u0440 \u043a\u043e\u0434\u0430 Haiku \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0451\u043c\u0430 \u0441 \u043d\u043e\u0432\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u043e\u043b\u043d\u044b\u0439 \u043e\u0442\u0447\u0451\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0434\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0431\u0437\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b. \u0427\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u0440\u043e\u0442\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f\u043c\u0438, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio-download\/\">PVS-Studio<\/a> \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>  \u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c Haiku \u0438 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b? \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Haiku \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e\u0442 \u0432\u0430\u0441 \u0432 <a href=\"https:\/\/t.me\/HaikuOS_RU_chat\">telegram-\u043a\u0430\u043d\u0430\u043b<\/a>.<\/p>\n<p><a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/461253\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c78\/30f\/70c\/c7830f70c5577c3d6704f254d7cad6a3.png\" align=\"left\"><\/a><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Svyatoslav Razmyslov. <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/461253\/\">How to shoot yourself in the foot in C and C++. Haiku OS Cookbook<\/a><\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/461255\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/461255\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio \u0441 \u043a\u043e\u0434\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Haiku \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u0434\u0430\u043b\u0451\u043a\u0438\u0439 2015-\u0439 \u0433\u043e\u0434. \u042d\u0442\u043e \u0431\u044b\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439\u0448\u0438\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434 \u043e\u0431\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442? \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0434\u043b\u044f Linux \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0451 \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u0433\u043e\u0434\u0430. \u041d\u043e \u0442\u0440\u0443\u0434\u044b \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u043e\u0432 \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u044b\u043b\u0438 \u0432\u043e\u0437\u043d\u0430\u0433\u0440\u0430\u0436\u0434\u0435\u043d\u044b: \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u0438 Haiku \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430, \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0431\u0430\u0437\u0443 \u0440\u0435\u0434\u043a\u0438\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432 \u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434 Haiku \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u0431\u044b\u0441\u0442\u0440\u043e.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3a8\/3b6\/925\/3a83b6925fff10cf8924920b96996e8d.png\" alt=\"Picture 3\"><\/div>\n<p>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-292539","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=292539"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292539\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=292539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=292539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=292539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}