{"id":305536,"date":"2020-06-18T09:01:06","date_gmt":"2020-06-18T09:01:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305536"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305536","title":{"rendered":"\u041a\u043e\u0434 \u0438\u0433\u0440\u044b Command &amp; Conquer: \u0431\u0430\u0433\u0438 \u0438\u0437 90-\u0445. \u0422\u043e\u043c \u043f\u0435\u0440\u0432\u044b\u0439"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/507162\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/45c\/686\/581\/45c686581b6cddb3473e6f0f7912deec.png\" alt=\"image1.png\"><\/div>\n<p>  \u0410\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Electronic Arts Inc (EA) \u0432\u044b\u043b\u043e\u0436\u0438\u043b\u0430 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0433\u0440 Command &amp; Conquer: Tiberian Dawn \u0438 Command &amp; Conquer: Red Alert. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043c\u043e\u0447\u044c \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u044b \u0438 \u043a\u0430\u0440\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u044e\u043d\u0438\u0442\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0423 \u0432\u0441\u0435\u0445 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043a\u0443\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0422\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0430\u0439\u0442\u0430 StackOverflow, \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0438 \u043c\u043e\u0449\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432. \u0410 \u0435\u0449\u0451 \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u0438 \u043f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u0451\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e, \u2014 \u044d\u0442\u043e \u0441\u043e\u0442\u043d\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435. \u041d\u043e \u0441 \u044d\u0442\u0438\u043c-\u0442\u043e \u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 PVS-Studio, \u0443\u043a\u0430\u0437\u0430\u0432 \u043d\u0430 \u043c\u0435\u0441\u0442\u0430 \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  Command &amp; Conquer \u2014 \u0441\u0435\u0440\u0438\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u0438\u0433\u0440 \u0432 \u0436\u0430\u043d\u0440\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041f\u0435\u0440\u0432\u0430\u044f \u0438\u0433\u0440\u0430 \u0441\u0435\u0440\u0438\u0438 \u0431\u044b\u043b\u0430 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u0432 1995 \u0433\u043e\u0434\u0443. \u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Electronic Arts \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u043b\u0430 \u0441\u0442\u0443\u0434\u0438\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u0442\u043e\u0439 \u0438\u0433\u0440\u044b \u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 1998 \u0433\u043e\u0434. <\/p>\n<p>  \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440 \u0432\u044b\u0448\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0433\u0440 \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u043e\u0432. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0433\u0440 <a href=\"https:\/\/github.com\/electronicarts\/CnC_Remastered_Collection\">\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b\u0438<\/a> \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0432\u044b\u043f\u0443\u0441\u043a\u043e\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 <a href=\"https:\/\/www.ea.com\/games\/command-and-conquer\/command-and-conquer-remastered\">Command &amp; Conquer Remastered<\/a>. <\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio\/\">PVS-Studio<\/a>. \u042d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 \u0421, C++, C# \u0438 Java.<\/p>\n<p>  \u0418\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0451\u043c\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u043a\u043e\u0434\u0435, \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u0442\u0430\u0442\u0435\u0439.<\/p>\n<h2>\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0438 copy-paste<\/h2>\n<p>  V501 There are identical sub-expressions to the left and to the right of the &#39;||&#39; operator: dest == 0 || dest == 0 CONQUER.CPP 5576<\/p>\n<pre><code class=\"cpp\">void List_Copy(short const * source, int len, short * dest) {   if (dest == NULL || dest == NULL) {     return;   }   .... }<\/code><\/pre>\n<p>  \u041d\u0430\u0447\u0430\u0442\u044c \u043e\u0431\u0437\u043e\u0440 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441 \u0432\u0435\u0447\u043d\u043e\u0433\u043e copy-paste. \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u043d\u0438 \u0440\u0430\u0437\u0443 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438 2 \u0440\u0430\u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c-\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 <i>dest == NULL<\/i> \u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>  V584 The &#39;Current&#39; value is present on both sides of the &#39;!=&#39; operator. The expression is incorrect or it can be simplified. CREDITS.CPP 173<\/p>\n<pre><code class=\"cpp\">void CreditClass::AI(bool forced, HouseClass *player_ptr, bool logic_only) {   ....   long adder = Credits - Current;   adder = ABS(adder);   adder &gt;&gt;= 5;   adder = Bound(adder, 1L, 71+72);   if (Current &gt; Credits) adder = -adder;   Current += adder;   Countdown = 1;    if (Current-adder != Current) {        \/\/ &lt;=     IsAudible = true;     IsUp = (adder &gt; 0);   }   .... }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435. \u042f \u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0442\u0430\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435:<\/p>\n<pre><code class=\"cpp\">if (Current-added != Credits)<\/code><\/pre>\n<p>  \u043d\u043e \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0431\u0435\u0434\u0438\u043b\u0430.<\/p>\n<p>  \u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<ul>\n<li>V584 The &#39;Current&#39; value is present on both sides of the &#39;!=&#39; operator. The expression is incorrect or it can be simplified. CREDITS.CPP 246<\/li>\n<\/ul>\n<p>  V524 It is odd that the body of &#39;Mono_Y&#39; function is fully equivalent to the body of &#39;Mono_X&#39; function. MONOC.CPP 753<\/p>\n<pre><code class=\"cpp\">class MonoClass {   ....   int Get_X(void) const {return X;};   int Get_Y(void) const {return Y;};   .... }  int Mono_X(void) {   if (MonoClass::Is_Enabled()) {     MonoClass *mono = MonoClass::Get_Current();     if (!mono) {       mono = new MonoClass();       mono-&gt;View();     }     return(short)mono-&gt;Get_X();                  \/\/ &lt;=   }   return(0); }  int Mono_Y(void) {   if (MonoClass::Is_Enabled()) {     MonoClass *mono = MonoClass::Get_Current();     if (!mono) {       mono = new MonoClass();       mono-&gt;View();     }     return(short)mono-&gt;Get_X();                  \/\/ &lt;= Get_Y() ?   }   return(0); }<\/code><\/pre>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043e\u0431\u044a\u0451\u043c\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u044f\u043c\u0438. \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0442\u0443\u0442 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0448\u044c, \u0447\u0442\u043e \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>Mono_Y<\/i> \u043f\u043e\u0437\u0432\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <i>Get_X<\/i>, \u0432\u043c\u0435\u0441\u0442\u043e <i>Get_Y<\/i>. \u0423 \u043a\u043b\u0430\u0441\u0441\u0430 <i>MonoClass<\/i> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c 2 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<p>  \u0418 \u043d\u0438\u0436\u0435 \u043f\u043e \u0444\u0430\u0439\u043b\u0443 \u043d\u0430\u0448\u0451\u043b\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430:<\/p>\n<ul>\n<li>V524 It is odd that the body of &#39;Mono_Y&#39; function is fully equivalent to the body of &#39;Mono_X&#39; function. MONOC.CPP 1083<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438<\/h2>\n<p>  V557 Array overrun is possible. The &#39;9&#39; index is pointing beyond array bound. FOOT.CPP 232<\/p>\n<pre><code class=\"cpp\">#define  CONQUER_PATH_MAX 9 \/\/ Number of cells to look ahead for movement.  FacingType Path[CONQUER_PATH_MAX];  void FootClass::Debug_Dump(MonoClass *mono) const {   ....   if (What_Am_I() != RTTI_AIRCRAFT) {     mono-&gt;Set_Cursor(50, 3);     mono-&gt;Printf(&quot;%s%s%s%s%s%s%s%s%s%s%s%s&quot;,       Path_To_String(Path[0]),       Path_To_String(Path[1]),       Path_To_String(Path[2]),       Path_To_String(Path[3]),       Path_To_String(Path[4]),       Path_To_String(Path[5]),       Path_To_String(Path[6]),       Path_To_String(Path[7]),       Path_To_String(Path[8]),       Path_To_String(Path[9]),       Path_To_String(Path[10]),       Path_To_String(Path[11]),       Path_To_String(Path[12]));     ....   }   .... }<\/code><\/pre>\n<p>  \u041f\u043e\u0445\u043e\u0436\u0435, \u044d\u0442\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043d\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u0434\u0430 \u043e\u043d \u043c\u043e\u0433 \u043d\u0430\u043d\u0435\u0441\u0442\u0438 \u043f\u0441\u0438\u0445\u0438\u043a\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0443\u043c\u0430\u043b\u0447\u0438\u0432\u0430\u0435\u0442. \u0417\u0434\u0435\u0441\u044c \u043c\u0430\u0441\u0441\u0438\u0432 <i>Path<\/i> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 <b>9<\/b> \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0430 \u043f\u0435\u0447\u0430\u0442\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 <b>13<\/b>.<\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e 4 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430:<\/p>\n<ul>\n<li>V557 Array overrun is possible. The &#39;9&#39; index is pointing beyond array bound. FOOT.CPP 232<\/li>\n<li>V557 Array overrun is possible. The &#39;10&#39; index is pointing beyond array bound. FOOT.CPP 233<\/li>\n<li>V557 Array overrun is possible. The &#39;11&#39; index is pointing beyond array bound. FOOT.CPP 234<\/li>\n<li>V557 Array overrun is possible. The &#39;12&#39; index is pointing beyond array bound. FOOT.CPP 235<\/li>\n<\/ul>\n<p>  V557 Array underrun is possible. The value of &#39;_SpillTable[index]&#39; index could reach -1. COORD.CPP 149<\/p>\n<pre><code class=\"cpp\">typedef enum FacingType : char {   ....   FACING_COUNT,  \/\/ 8   FACING_FIRST=0 } FacingType;  short const * Coord_Spillage_List(COORDINATE coord, int maxsize) {   static short const _MoveSpillage[(int)FACING_COUNT+1][5] = {     ....   };    static char const _SpillTable[16] = {8,6,2,-1,0,7,1,-1,4,5,3,-1,-1,-1,-1,-1};    ....   return(&amp;_MoveSpillage[_SpillTable[index]][0]);   .... }<\/code><\/pre>\n<p>  \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043b\u043e\u0436\u043d\u044b\u0439, \u043d\u043e \u0432 \u043d\u0451\u043c \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>  \u041a \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0443 <i>_MoveSpillage<\/i> \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 <i>_SpillTable<\/i>. \u0410 \u043e\u043d \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d \u043f\u043e \u043e\u0441\u043e\u0431\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435 \u0438 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a. \u041d\u043e \u044f \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d \u0432 \u044d\u0442\u043e\u043c.<\/p>\n<p>  V512 A call of the &#39;sprintf&#39; function will lead to overflow of the buffer &#39;(char *) ptr&#39;. SOUNDDLG.CPP 250<\/p>\n<pre><code class=\"cpp\">void SoundControlsClass::Process(void) {   ....   void * ptr = new char [sizeof(100)];                                \/\/ &lt;=    if (ptr) {     sprintf((char *)ptr, &quot;%cTrack %d\\t%d:%02d\\t%s&quot;,                   \/\/ &lt;=       index, listbox.Count()+1, length \/ 60, length % 60, fullname);     listbox.Add_Item((char const *)ptr);   }   .... }<\/code><\/pre>\n<p>  \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0434\u0430\u0441\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a\u0430\u044f \u0434\u043b\u0438\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0431\u0443\u0444\u0435\u0440 \u0438\u0437 4-\u0445 \u0431\u0430\u0439\u0442? \u0410 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0434\u0443\u043c\u0430\u043b, \u0447\u0442\u043e <i>sizeof(100)<\/i> \u0432\u0435\u0440\u043d\u0451\u0442 \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 (\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c <i>100<\/i>). \u041d\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>sizeof<\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0438\u043f\u0430 \u0438 \u0434\u0430\u0436\u0435 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <i>100<\/i>, \u0430 \u0435\u0449\u0451 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a \u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  V512 A call of the &#39;memset&#39; function will lead to underflow of the buffer &#39;Buffer&#39;. KEYBOARD.CPP 96<\/p>\n<pre><code class=\"cpp\">unsigned short Buffer[256];  WWKeyboardClass::WWKeyboardClass(void) {   ....   memset(Buffer, 0, 256);   .... }<\/code><\/pre>\n<p>  \u041d\u0435\u043a\u0438\u0439 \u0431\u0443\u0444\u0435\u0440 \u043e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430 256 \u0431\u0430\u0439\u0442, \u0445\u043e\u0442\u044f \u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 <i>256*sizeof(unsigned short)<\/i>. \u041e\u0448\u0438\u0431\u043e\u0447\u043a\u0430.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0435\u0449\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c:<\/p>\n<pre><code class=\"cpp\">memset(Buffer, 0, sizeof(Buffer));<\/code><\/pre>\n<p>  V557 Array overrun is possible. The &#39;QuantityB&#39; function processes value &#39;[0..86]&#39;. Inspect the first argument. Check lines: &#39;HOUSE.H:928&#39;, &#39;CELL.CPP:2337&#39;. HOUSE.H 928<\/p>\n<pre><code class=\"cpp\">typedef enum StructType : char {   STRUCT_NONE=-1,   ....   STRUCT_COUNT,                                       \/\/ &lt;= 87   STRUCT_FIRST=0 } StructType;  int BQuantity[STRUCT_COUNT-3];                        \/\/ &lt;= [0..83]  int QuantityB(int index) {return(BQuantity[index]);}  \/\/ &lt;= [0..86]  bool CellClass::Goodie_Check(FootClass * object) {   ....   int bcount = 0;   for( j=0; j &lt; STRUCT_COUNT; j++) {     bcount += hptr-&gt;QuantityB(j);                     \/\/ &lt;= [0..86]   }   .... }<\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432 \u043d\u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f. \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043e \u0432\u044b\u0445\u043e\u0434\u0435 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432\u044b\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u043c\u0435\u0441\u0442\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0443 <i>BQuantity<\/i> \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443. \u0420\u0430\u0437\u043c\u0435\u0440 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u2013 84 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2013 <i>Goodie_Check<\/i>. \u0422\u0430\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0446\u0438\u043a\u043b \u0441 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <i>86<\/i>. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0442\u0435\u043d\u0438\u0435 12 \u0431\u0430\u0439\u0442 &quot;\u0447\u0443\u0436\u043e\u0439&quot; \u043f\u0430\u043c\u044f\u0442\u0438 (3 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0442\u0438\u043f\u0430 <i>int<\/i>).<\/p>\n<p>  V575 The &#39;memset&#39; function processes &#39;0&#39; elements. Inspect the third argument. DLLInterface.cpp 1103<\/p>\n<pre><code class=\"cpp\">void* __cdecl memset(   _Out_writes_bytes_all_(_Size) void*  _Dst,   _In_                          int    _Val,   _In_                          size_t _Size );  extern &quot;C&quot; __declspec(dllexport) bool __cdecl CNC_Read_INI(....) {   ....   memset(ini_buffer, _ini_buffer_size, 0);   .... }<\/code><\/pre>\n<p>  \u041f\u043e-\u043c\u043e\u0435\u043c\u0443, \u044f \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0432\u0438\u0434\u0435\u043b \u044d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443 \u0438 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043f\u0443\u0442\u0430\u044e\u0442 2-\u0439 \u0438 3-\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>memset<\/i>.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u0435\u0441\u0442\u043e:<\/p>\n<ul>\n<li>V575 The &#39;memset&#39; function processes &#39;0&#39; elements. Inspect the third argument. DLLInterface.cpp 1404<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041f\u0440\u043e \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/h2>\n<p>  V522 Dereferencing of the null pointer &#39;list&#39; might take place. DISPLAY.CPP 1062<\/p>\n<pre><code class=\"cpp\">void DisplayClass::Get_Occupy_Dimensions(int &amp; w, int &amp; h, short const *list) {   ....   if (!list) {     \/*     ** Loop through all cell offsets, accumulating max &amp; min x- &amp; y-coords     *\/     while (*list != REFRESH_EOL) {       ....     }     ....   }   .... }<\/code><\/pre>\n<p>  \u042f\u0432\u043d\u043e\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043d\u0443\u043b\u0435\u0432\u043e\u043c\u0443 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e. \u042d\u0442\u043e \u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0438 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c:<\/p>\n<ul>\n<li>V522 Dereferencing of the null pointer &#39;list&#39; might take place. DISPLAY.CPP 951<\/li>\n<li>V522 Dereferencing of the null pointer &#39;unitsptr&#39; might take place. QUEUE.CPP 2362<\/li>\n<li>V522 Dereferencing of the null pointer &#39;unitsptr&#39; might take place. QUEUE.CPP 2699<\/li>\n<\/ul>\n<p>  V595 The &#39;enemy&#39; pointer was utilized before it was verified against nullptr. Check lines: 3689, 3695. TECHNO.CPP 3689<\/p>\n<pre><code class=\"cpp\">void TechnoClass::Base_Is_Attacked(TechnoClass const *enemy) {   FootClass *defender[6];   int value[6];   int count = 0;   int weakest = 0;   int desired = enemy-&gt;Risk() * 2;   int risktotal = 0;    \/*   ** Humans have to deal with their own base is attacked problems.   *\/   if (!enemy || House-&gt;Is_Ally(enemy) || House-&gt;IsHuman) {     return;   }   .... }<\/code><\/pre>\n<p>  \u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>enemy<\/i> \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u044e\u0442, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442, \u0447\u0442\u043e \u043e\u043d \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439. \u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u0435 \u043f\u043e\u0431\u043e\u044e\u0441\u044c \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430, \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0441 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u0435\u0441\u043b\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f PVS-Studio \ud83d\ude09<\/p>\n<h2>\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043a\u0430\u0441\u0442\u044b<\/h2>\n<p>  V551 The code under this &#39;case&#39; label is unreachable. The &#39;4109&#39; value of the &#39;char&#39; type is not in the range [-128; 127]. WINDOWS.CPP 547<\/p>\n<pre><code class=\"cpp\">#define VK_RETURN 0x0D  typedef enum {   ....   WWKEY_VK_BIT = 0x1000,   .... }  enum {   ....   KA_RETURN = VK_RETURN | WWKEY_VK_BIT,   .... }  void Window_Print(char const string[], ...) {   char c; \/\/ Current character.   ....   switch(c) {     ....     case KA_FORMFEED: \/\/ &lt;= 12         New_Window();         break;     case KA_RETURN:   \/\/ &lt;= 4109       Flush_Line();       ScrollCounter++;       WinCx = 0;       WinCy++;       break;     ....   }   .... }<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0432\u0432\u043e\u0434\u0438\u043c\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0432 \u0442\u0438\u043f <i>char<\/i> \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f 1-\u0431\u0430\u0439\u0442\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438 \u0447\u0438\u0441\u043b\u0430 <i>4109<\/i> \u0442\u0430\u043c \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0422\u0430\u043a, \u044d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>switch<\/i> \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u0443\u044e \u0432\u0435\u0442\u043a\u0443 \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e:<\/p>\n<ul>\n<li>V551 The code under this &#39;case&#39; label is unreachable. The &#39;4105&#39; value of the &#39;char&#39; type is not in the range [-128; 127]. WINDOWS.CPP 584<\/li>\n<li>V551 The code under this &#39;case&#39; label is unreachable. The &#39;4123&#39; value of the &#39;char&#39; type is not in the range [-128; 127]. WINDOWS.CPP 628<\/li>\n<\/ul>\n<p>  V552 A bool type variable is being incremented: printedtext ++. Perhaps another variable should be incremented instead. ENDING.CPP 170<\/p>\n<pre><code class=\"cpp\">void Nod_Ending(void) {   ....   bool printedtext = false;   while (!done) {     if (!printedtext &amp;&amp; !Is_Sample_Playing(kanefinl)) {       printedtext++;       Alloc_Object(....);       mouseshown = true;       Show_Mouse();     }     ....   }   .... }<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0451\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 <i>bool<\/i>. \u042d\u0442\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u0430, \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0435\u0439\u0447\u0430\u0441. \u0422\u0430\u043a\u0436\u0435 \u0442\u0430\u043a\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u0430 \u043a\u0430\u043a deprecated, \u043d\u0430\u0447\u0438\u043d\u0430\u044f c\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C++17.<\/p>\n<p>  \u0412\u0441\u0435\u0433\u043e 2 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430 \u0431\u044b\u043b\u043e \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043e:<\/p>\n<ul>\n<li>V552 A bool type variable is being incremented: done ++. Perhaps another variable should be incremented instead. ENDING.CPP 187<\/li>\n<\/ul>\n<p>  V556 The values of different enum types are compared. Types: ImpactType, ResultType. AIRCRAFT.CPP 742<\/p>\n<pre><code class=\"cpp\">ImpactType FlyClass::Physics(COORDINATE &amp; coord, DirType facing);  typedef enum ImpactType : unsigned char {             \/\/ &lt;=   IMPACT_NONE,   IMPACT_NORMAL,   IMPACT_EDGE } ImpactType;  typedef enum ResultType : unsigned char {             \/\/ &lt;=   RESULT_NONE,   .... } ResultType;  void AircraftClass::AI(void) {   ....   if (Physics(Coord, PrimaryFacing) != RESULT_NONE) { \/\/ &lt;=     Mark();   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0437\u0430\u0432\u044f\u0437\u0430\u043b \u043d\u0435\u043a\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u043d\u0430 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442.\u043a. \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u041d\u043e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u043c. \u0421\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 (\u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0435\u0449\u0451 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e).<\/p>\n<p>  \u0412\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u044d\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<ul>\n<li>V556 The values of different enum types are compared: SoundEffectName[voc].Where == IN_JUV. DLLInterface.cpp 402<\/li>\n<li>V556 The values of different enum types are compared: SoundEffectName[voc].Where == IN_VAR. DLLInterface.cpp 405<\/li>\n<li>V556 The values of different enum types are compared: Map.Theater == CNC_THEATER_DESERT. Types: TheaterType, CnCTheaterType. DLLInterface.cpp 2805<\/li>\n<li>V556 The values of different enum types are compared. Types: ImpactType, ResultType. AIRCRAFT.CPP 4269<\/li>\n<li>V556 The values of different enum types are compared: SoundEffectName[voc].Where == IN_VAR. DLLInterface.cpp 429<\/li>\n<\/ul>\n<p>  V716 Suspicious type conversion in assign expression: &#39;HRESULT = BOOL&#39;. GBUFFER.H 780<\/p>\n<pre><code class=\"cpp\">BOOL __cdecl Linear_Blit_To_Linear(...);  inline HRESULT GraphicViewPortClass::Blit(....) {   HRESULT return_code=0;   ....   return_code=(Linear_Blit_To_Linear(this, &amp;dest, x_pixel, y_pixel                       , dx_pixel, dy_pixel                       , pixel_width, pixel_height, trans));   ....    return ( return_code ); }<\/code><\/pre>\n<p>  \u0422\u043e\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0440\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u0432 \u043d\u0430\u0448\u0438 \u0434\u043d\u0438. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0438\u043f\u043e\u043c HRESULT \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 BOOL \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e. \u042d\u0442\u0438 \u0434\u0432\u0430 \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u0445\u043e\u0436\u0438 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u044f\u0437\u044b\u043a\u0430, \u043d\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0432 \u043a\u043e\u0434\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u044f\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u043b\u0438\u0448\u0435\u043d\u0430 \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<p>  \u042d\u0442\u043e \u0438 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442 \u0441\u0442\u043e\u0438\u043b\u043e \u0431\u044b \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c:<\/p>\n<ul>\n<li>V716 Suspicious type conversion in assign expression: &#39;HRESULT = BOOL&#39;. GBUFFER.H 817<\/li>\n<li>V716 Suspicious type conversion in assign expression: &#39;HRESULT = BOOL&#39;. GBUFFER.H 857<\/li>\n<li>V716 Suspicious type conversion in assign expression: &#39;HRESULT = BOOL&#39;. GBUFFER.H 773<\/li>\n<li>V716 Suspicious type conversion in assign expression: &#39;HRESULT = BOOL&#39;. GBUFFER.H 810<\/li>\n<li>V716 Suspicious type conversion in assign expression: &#39;HRESULT = BOOL&#39;. GBUFFER.H 850<\/li>\n<\/ul>\n<p>  V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(~0)&#39; is negative. MP.CPP 2410<\/p>\n<pre><code class=\"cpp\">void XMP_Randomize(digit * result, Straw &amp; rng, int total_bits, int precision) {   ....   ((unsigned char *)result)[nbytes-1] &amp;=     (unsigned char)(~((~0) &lt;&lt; (total_bits % 8)));   .... }<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0434\u0432\u0438\u0433 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432\u043b\u0435\u0432\u043e, \u0447\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c. \u041e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043d\u0443\u043b\u044f \u043f\u0440\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438\u043d\u0432\u0435\u0440\u0441\u0438\u0438. \u0422.\u043a. \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0438\u043f <i>int<\/i>, \u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0433\u043e \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u043e\u043d \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439.<\/p>\n<p>  \u0412 2020 \u0433\u043e\u0434\u0443 \u0442\u0430\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0443\u0436\u0435 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440:<\/p>\n<p>  <i>Warning C26453: Arithmetic overflow: Left shift of a negative signed number is undefined behavior.<\/i><\/p>\n<p>  \u041d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u043c\u0438, \u0442.\u043a. \u0440\u0435\u0448\u0430\u044e\u0442 \u0434\u0440\u0443\u0433\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio:<\/p>\n<p>  V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The right operand (&#39;(32 \u2014 bits_to_shift)&#39; = [1..32]) is greater than or equal to the length in bits of the promoted left operand. MP.CPP 659<\/p>\n<pre><code class=\"cpp\">#define UNITSIZE 32  void XMP_Shift_Right_Bits(digit * number, int bits, int precision) {   ....   int digits_to_shift = bits \/ UNITSIZE;   int bits_to_shift = bits % UNITSIZE;    int index;   for (index = digits_to_shift; index &lt; (precision-1); index++) {     *number = (*(number + digits_to_shift) &gt;&gt; bits_to_shift) |       (*(number + (digits_to_shift + 1)) &lt;&lt; (UNITSIZE - bits_to_shift));     number++;   }   .... }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0433\u0434\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0441\u0434\u0432\u0438\u0433 \u0432\u043f\u0440\u0430\u0432\u043e 32-\u0445 \u0431\u0438\u0442\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u0440\u044f\u0434\u043e\u0432, \u0447\u0435\u043c \u0442\u0430\u043c \u0435\u0441\u0442\u044c. \u0412\u043e\u0442, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"cpp\">int bits_to_shift = bits % UNITSIZE;<\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <i>UNITSIZE<\/i> \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>32<\/i>:<\/p>\n<pre><code class=\"cpp\">int bits_to_shift = bits % 32;<\/code><\/pre>\n<p>  \u0422\u0430\u043a, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>bits_to_shift<\/i> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <i>bits<\/i>, \u043a\u0440\u0430\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u043b\u0443 <i>32<\/i>.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">.... &lt;&lt; (UNITSIZE - bits_to_shift) ....<\/code><\/pre>\n<p>  \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u0434\u0432\u0438\u0433 \u043d\u0430 32 \u0440\u0430\u0437\u0440\u044f\u0434\u0430, \u0435\u0441\u043b\u0438 \u0438\u0437 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b <i>32<\/i> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f <i>0<\/i>.<\/p>\n<p>  \u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 PVS-Studio \u043f\u0440\u043e \u0441\u0434\u0432\u0438\u0433\u0438 \u0441 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c:<\/p>\n<ul>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(~0)&#39; is negative. TARGET.H 66<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 24) * 256) \/ 24)&#39; is negative. ANIM.CPP 160<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 12) * 256) \/ 24)&#39; is negative. BUILDING.CPP 4037<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 21) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2160<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 21) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2161<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 20) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2162<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 20) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2163<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 18) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2164<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 18) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2165<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 17) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2166<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 16) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2167<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 15) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2168<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 14) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2169<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 13) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2170<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 12) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2171<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 11) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2172<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 10) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2173<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 9) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2174<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 8) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2175<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 7) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2176<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 6) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2177<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 5) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2178<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 4) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2179<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 3) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2180<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 2) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2181<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 1) * 256) \/ 24)&#39; is negative. DRIVE.CPP 2182<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(((- 5) * 256) \/ 24)&#39; is negative. INFANTRY.CPP 2730<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&gt;&gt;&#39;. The right operand (&#39;(32 \u2014 bits_to_shift)&#39; = [1..32]) is greater than or equal to the length in bits of the promoted left operand. MP.CPP 743<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(~0)&#39; is negative. RANDOM.CPP 102<\/li>\n<li>V610 Undefined behavior. Check the shift operator &#39;&lt;&lt;&#39;. The left operand &#39;(~0L)&#39; is negative. RANDOM.CPP 164<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0411\u0443\u0434\u0435\u043c \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b Electronic Arts \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043d\u0430 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio-download\/\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/a> \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c PVS-Studio \u043d\u0430 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>  \u041a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c, \u0447\u0442\u043e \u0438 \u0441 \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u043d\u044c\u0448\u0435 \u0434\u0435\u043b\u0430\u043b\u0438 \u043a\u0440\u0443\u0442\u044b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u0438\u0433\u0440\u044b, \u0438 \u043e\u0442\u0447\u0430\u0441\u0442\u0438 \u0441 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f. \u041d\u043e \u043d\u0435 \u043d\u0430\u0434\u043e \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0446\u0438\u044f \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u0438\u0433\u0440 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0437\u0430 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442. \u0412\u044b\u0440\u043e\u0441\u043b\u0438 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0438 \u0440\u0435\u043a\u043b\u0430\u043c\u0443. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043f\u043e\u0437\u0434\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u043b\u0435\u0447\u0451\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u044b\u0435 \u0438 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0443\u0431\u044b\u0442\u043a\u0438.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043d\u0430\u0448\u0438\u043c \u0431\u043b\u043e\u0433\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c 2-\u044e \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u0437\u043e\u0440\u0430 \u043a \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0438\u0433\u0440.<\/p>\n<p>  <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/507164\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/eb2\/f9c\/3bb\/eb2f9c3bb5f32f39239298d36431961c.png\"><\/div>\n<p><\/a><br \/>  \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\/507164\/\">The Code of the Command &amp; Conquer Game: Bugs From the 90&#39;s. Volume one<\/a>.<\/div>\n<p> \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\/507162\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/507162\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/507162\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/45c\/686\/581\/45c686581b6cddb3473e6f0f7912deec.png\" alt=\"image1.png\"><\/div>\n<p>  \u0410\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Electronic Arts Inc (EA) \u0432\u044b\u043b\u043e\u0436\u0438\u043b\u0430 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0433\u0440 Command &amp; Conquer: Tiberian Dawn \u0438 Command &amp; Conquer: Red Alert. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043c\u043e\u0447\u044c \u0438\u0433\u0440\u043e\u0432\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u044b \u0438 \u043a\u0430\u0440\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u044e\u043d\u0438\u0442\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0423 \u0432\u0441\u0435\u0445 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u043a\u0443\u043d\u0443\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0422\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0430\u0439\u0442\u0430 StackOverflow, \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0438 \u043c\u043e\u0449\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432. \u0410 \u0435\u0449\u0451 \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u0438 \u043f\u0435\u0440\u0432\u043e\u0435, \u0441 \u0447\u0435\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u0451\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e, \u2014 \u044d\u0442\u043e \u0441\u043e\u0442\u043d\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435. \u041d\u043e \u0441 \u044d\u0442\u0438\u043c-\u0442\u043e \u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 PVS-Studio, \u0443\u043a\u0430\u0437\u0430\u0432 \u043d\u0430 \u043c\u0435\u0441\u0442\u0430 \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.  <\/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-305536","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305536","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=305536"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305536\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}