{"id":306842,"date":"2020-07-13T09:00:55","date_gmt":"2020-07-13T09:00:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=306842"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=306842","title":{"rendered":"\u041a\u043e\u0434 \u0438\u0433\u0440\u044b Command &amp; Conquer: \u0431\u0430\u0433\u0438 \u0438\u0437 90-\u0445. \u0422\u043e\u043c \u0432\u0442\u043e\u0440\u043e\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\/510656\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/bf7\/c02\/794\/bf7c0279443646b677fedab55dfbe71f.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. \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432.<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. \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>  \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u0431\u0437\u043e\u0440 \u043e\u0448\u0438\u0431\u043e\u043a: &quot;<a href=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/507162\/\">\u0418\u0433\u0440\u0430 Command &amp; Conquer: \u0431\u0430\u0433\u0438 \u0438\u0437 90-\u0445. \u0422\u043e\u043c \u043f\u0435\u0440\u0432\u044b\u0439<\/a>&quot;.<\/p>\n<h2>\u041e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445<\/h2>\n<p>  V583 The &#39;?:&#39; operator, regardless of its conditional expression, always returns one and the same value: 3072. STARTUP.CPP 1136<\/p>\n<pre><code class=\"cpp\">void Read_Setup_Options( RawFileClass *config_file ) {   ....   ScreenHeight = ini.Get_Bool(&quot;Options&quot;, &quot;Resolution&quot;, false) ? 3072 : 3072;   .... }<\/code><\/pre>\n<p>  \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0432\u043b\u0438\u044f\u0442\u044c. \u0422\u043e\u0447\u043d\u0435\u0435 \u043e\u043d\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u0438, \u043d\u043e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c.<\/p>\n<p>  V590 Consider inspecting the &#39;i &lt; 8 &amp;&amp; i &lt; 4&#39; expression. The expression is excessive or contains a misprint. DLLInterface.cpp 2238<\/p>\n<pre><code class=\"cpp\">\/\/ Maximum number of multi players possible. #define MAX_PLAYERS 8 \/\/ max # of players we can have  for (int i = 0; i &lt; MAX_PLAYERS &amp;&amp; i &lt; 4; i++) {   if (GlyphxPlayerIDs[i] == player_id) {     MultiplayerStartPositions[i] = XY_Cell(x, y);   } }<\/code><\/pre>\n<p>  \u0418\u0437-\u0437\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0438\u0433\u0440\u043e\u043a\u043e\u0432. \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <i>MAX_PLAYERS 8<\/i> \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0433\u0440\u043e\u043a\u043e\u0432. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u2013 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <i>i &lt; 4<\/i> \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>&amp;&amp;<\/i>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0446\u0438\u043a\u043b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 8 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b \u2013 \u0437\u0430\u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u0437 \u043a\u043e\u0434\u0430.<\/p>\n<p>  V648 Priority of the &#39;&amp;&amp;&#39; operation is higher than that of the &#39;||&#39; operation. INFANTRY.CPP 1003<\/p>\n<pre><code class=\"cpp\">void InfantryClass::Assign_Target(TARGET target) {   ....   if (building &amp;&amp; building-&gt;Class-&gt;IsCaptureable &amp;&amp;     (GameToPlay != GAME_NORMAL || *building != STRUCT_EYE &amp;&amp; Scenario &lt; 13)) {     Assign_Destination(target);   }   .... }<\/code><\/pre>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c (\u0438, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u043c) \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <i>||<\/i> \u0438 <i>&amp;&amp;<\/i>. \u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442. \u041d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043e\u0431\u0449\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0438 \u0435\u0449\u0451 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439:<\/p>\n<ul>\n<li>V648 Priority of the &#39;&amp;&amp;&#39; operation is higher than that of the &#39;||&#39; operation. TEAM.CPP 456<\/li>\n<li>V648 Priority of the &#39;&amp;&amp;&#39; operation is higher than that of the &#39;||&#39; operation. DISPLAY.CPP 1160<\/li>\n<li>V648 Priority of the &#39;&amp;&amp;&#39; operation is higher than that of the &#39;||&#39; operation. DISPLAY.CPP 1571<\/li>\n<li>V648 Priority of the &#39;&amp;&amp;&#39; operation is higher than that of the &#39;||&#39; operation. HOUSE.CPP 2594<\/li>\n<li>V648 Priority of the &#39;&amp;&amp;&#39; operation is higher than that of the &#39;||&#39; operation. INIT.CPP 2541<\/li>\n<\/ul>\n<p>  V617 Consider inspecting the condition. The &#39;((1L &lt;&lt; STRUCT_CHRONOSPHERE))&#39; argument of the &#39;|&#39; bitwise operation contains a non-zero value. HOUSE.CPP 5089<\/p>\n<pre><code class=\"cpp\">typedef enum StructType : char {   STRUCT_NONE=-1,   STRUCT_ADVANCED_TECH,   STRUCT_IRON_CURTAIN,   STRUCT_WEAP,   STRUCT_CHRONOSPHERE, \/\/ 3   .... }  #define  STRUCTF_CHRONOSPHERE (1L &lt;&lt; STRUCT_CHRONOSPHERE)  UrgencyType HouseClass::Check_Build_Power(void) const {   ....   if (State == STATE_THREATENED || State == STATE_ATTACKED) {     if (BScan | (STRUCTF_CHRONOSPHERE)) {  \/\/ &lt;=       urgency = URGENCY_HIGH;     }   }   .... }<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0431\u0438\u0442\u044b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &amp;, \u0430 \u043d\u0435 |. \u0418\u0437-\u0437\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0432 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435.<\/p>\n<p>  V768 The enumeration constant &#39;WWKEY_RLS_BIT&#39; is used as a variable of a Boolean-type. KEYBOARD.CPP 286<\/p>\n<pre><code class=\"cpp\">typedef enum {   WWKEY_SHIFT_BIT = 0x100,   WWKEY_CTRL_BIT  = 0x200,   WWKEY_ALT_BIT   = 0x400,   WWKEY_RLS_BIT   = 0x800,   WWKEY_VK_BIT    = 0x1000,   WWKEY_DBL_BIT   = 0x2000,   WWKEY_BTN_BIT   = 0x8000, } WWKey_Type;  int WWKeyboardClass::To_ASCII(int key) {   if ( key &amp;&amp; WWKEY_RLS_BIT)     return(KN_NONE);   return(key); }<\/code><\/pre>\n<p>  \u042f \u0434\u0443\u043c\u0430\u044e, \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 <i>key<\/i> \u0445\u043e\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0431\u0438\u0442, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u043a\u043e\u0439 <i>WWKEY_RLS_BIT<\/i>, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &amp;, \u0430 \u043d\u0435 &amp;&amp;, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u043e\u0434 \u043a\u043b\u0430\u0432\u0438\u0448\u0438.<\/p>\n<h2>\u041f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>  V523 The &#39;then&#39; statement is equivalent to the &#39;else&#39; statement. RADAR.CPP 1827<\/p>\n<pre><code class=\"cpp\">void RadarClass::Player_Names(bool on) {   IsPlayerNames = on;   IsToRedraw = true;   if (on) {     Flag_To_Redraw(true); \/\/    Flag_To_Redraw(false);   } else {     Flag_To_Redraw(true);   \/\/ force drawing of the plate   } }<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438. \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440 \u0432 \u043a\u043e\u0434\u0435 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0442\u043a\u0430\u0445.<\/p>\n<p>  \u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u043c\u0435\u0441\u0442 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0435\u0449\u0451 \u0434\u0432\u0430:<\/p>\n<ul>\n<li>V523 The &#39;then&#39; statement is equivalent to the &#39;else&#39; statement. CELL.CPP 1792<\/li>\n<li>V523 The &#39;then&#39; statement is equivalent to the &#39;else&#39; statement. RADAR.CPP 2274<\/li>\n<\/ul>\n<p>  V705 It is possible that &#39;else&#39; block was forgotten or commented out, thus altering the program&#39;s operation logics. NETDLG.CPP 1506<\/p>\n<pre><code class=\"cpp\">static int Net_Join_Dialog(void) {   ....   \/*...............................................................   F4\/SEND\/&#39;M&#39; = edit a message   ...............................................................*\/   if (Messages.Get_Edit_Buf()==NULL) {     ....   } else    \/*...............................................................   If we&#39;re already editing a message and the user clicks on   &#39;Send&#39;, translate our input to a Return so Messages.Input() will   work properly.   ...............................................................*\/   if (input==(BUTTON_SEND | KN_BUTTON)) {     input = KN_RETURN;   }   .... }<\/code><\/pre>\n<p>  \u0418\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0435 \u0443\u0432\u0438\u0434\u0435\u043b \u0432\u044b\u0448\u0435 \u043d\u0435\u0434\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440. \u041e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>else<\/i> \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u043d\u0438\u0436\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e <i>else if<\/i>, \u0447\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438.<\/p>\n<p>  V519 The &#39;ScoresPresent&#39; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 539, 541. INIT.CPP 541<\/p>\n<pre><code class=\"cpp\">bool Init_Game(int , char *[]) {   ....   ScoresPresent = false; \/\/if (CCFileClass(&quot;SCORES.MIX&quot;).Is_Available()) {     ScoresPresent = true;     if (!ScoreMix) {       ScoreMix = new MixFileClass(&quot;SCORES.MIX&quot;);       ThemeClass::Scan();     } \/\/}<\/code><\/pre>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u0435\u0444\u0435\u043a\u0442 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>ScoresPresent<\/i> \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>true<\/i>, \u0438\u043b\u0438 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 <i>false<\/i>.<\/p>\n<h2>\u041e\u0448\u0438\u0431\u043a\u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>  V611 The memory was allocated using &#39;new T[]&#39; operator but was released using the &#39;delete&#39; operator. Consider inspecting this code. It&#39;s probably better to use &#39;delete [] poke_data;&#39;. CCDDE.CPP 410<\/p>\n<pre><code class=\"cpp\">BOOL Send_Data_To_DDE_Server (char *data, int length, int packet_type) {   ....   char *poke_data = new char [length + 2*sizeof(int)]; \/\/ &lt;=   ....   if(DDE_Class-&gt;Poke_Server( .... ) == FALSE) {     CCDebugString(&quot;C&amp;C95 - POKE failed!\\n&quot;);     DDE_Class-&gt;Close_Poke_Connection();     delete poke_data;                                  \/\/ &lt;=     return (FALSE);   }    DDE_Class-&gt;Close_Poke_Connection();    delete poke_data;                                    \/\/ &lt;=    return (TRUE); }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u0430\u043c\u044f\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438. \u0414\u043b\u044f \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>delete[]<\/i>, \u0430 \u043d\u0435 <i>delete<\/i>.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0438 \u0432\u0441\u0435 \u043e\u043d\u0438 \u043f\u043e\u043d\u0435\u043c\u043d\u043e\u0433\u0443 \u0432\u0440\u0435\u0434\u044f\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e (\u0438\u0433\u0440\u0435):<\/p>\n<ul>\n<li>V611 The memory was allocated using &#39;new T[]&#39; operator but was released using the &#39;delete&#39; operator. Consider inspecting this code. It&#39;s probably better to use &#39;delete [] poke_data;&#39;. CCDDE.CPP 416<\/li>\n<li>V611 The memory was allocated using &#39;new T[]&#39; operator but was released using the &#39;delete&#39; operator. Consider inspecting this code. It&#39;s probably better to use &#39;delete [] temp_buffer;&#39;. INIT.CPP 1302<\/li>\n<li>V611 The memory was allocated using &#39;new T[]&#39; operator but was released using the &#39;delete&#39; operator. Consider inspecting this code. It&#39;s probably better to use &#39;delete [] progresspalette;&#39;. MAPSEL.CPP 795<\/li>\n<li>V611 The memory was allocated using &#39;new T[]&#39; operator but was released using the &#39;delete&#39; operator. Consider inspecting this code. It&#39;s probably better to use &#39;delete [] grey2palette;&#39;. MAPSEL.CPP 796<\/li>\n<li>V611 The memory was allocated using &#39;new T[]&#39; operator but was released using the &#39;delete&#39; operator. Consider inspecting this code. It&#39;s probably better to use &#39;delete [] poke_data;&#39;. CCDDE.CPP 422<\/li>\n<li>V611 The memory was allocated using &#39;new T[]&#39; operator but was released using the &#39;delete&#39; operator. Consider inspecting this code. It&#39;s probably better to use &#39;delete [] temp_buffer;&#39;. INIT.CPP 1139<\/li>\n<\/ul>\n<p>  V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. ENDING.CPP 254<\/p>\n<pre><code class=\"cpp\">void GDI_Ending(void) {   ....   void * localpal = Load_Alloc_Data(CCFileClass(&quot;SATSEL.PAL&quot;));   ....   delete [] localpal;   .... }<\/code><\/pre>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <i>delete<\/i> \u0438 <i>delete[]<\/i> \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u043d\u0435\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e. \u041e\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0440\u0430\u0437\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u043e\u0447\u0438\u0441\u0442\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438. \u0410 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u0435\u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u0434\u0451\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. \u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0435 \u044f\u0437\u044b\u043a\u0430 C++ \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e.<\/p>\n<p>  \u0422\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0442\u043e\u0436\u0435 \u043d\u0430\u0448\u0451\u043b\u0441\u044f \u0446\u0435\u043b\u044b\u0439 \u0440\u044f\u0434 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430:<\/p>\n<ul>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. HEAP.CPP 284<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. INIT.CPP 728<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. MIXFILE.CPP 134<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. MIXFILE.CPP 391<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. MSGBOX.CPP 423<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. SOUNDDLG.CPP 407<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. BUFFER.CPP 126<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. BUFF.CPP 162<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. BUFF.CPP 212<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. BFIOFILE.CPP 330<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. EVENT.CPP 934<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. HEAP.CPP 318<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. INIT.CPP 3851<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. MIXFILE.CPP 130<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. MIXFILE.CPP 430<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. MIXFILE.CPP 447<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. MIXFILE.CPP 481<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. MSGBOX.CPP 461<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. QUEUE.CPP 2982<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. QUEUE.CPP 3167<\/li>\n<li>V772 Calling a &#39;delete&#39; operator for a void pointer will cause undefined behavior. SOUNDDLG.CPP 406<\/li>\n<\/ul>\n<p>  V773 The function was exited without releasing the &#39;progresspalette&#39; pointer. A memory leak is possible. MAPSEL.CPP 258<\/p>\n<pre><code class=\"cpp\">void Map_Selection(void) {   ....   unsigned char *grey2palette    = new unsigned char[768];   unsigned char *progresspalette = new unsigned char[768];   ....   scenario = Scenario + ((house == HOUSE_GOOD) ? 0 : 14);   if (house == HOUSE_GOOD) {     lastscenario = (Scenario == 14);     if (Scenario == 15) return;   } else {     lastscenario = (Scenario == 12);     if (Scenario == 13) return;   }   .... }<\/code><\/pre>\n<p>  &quot;\u0415\u0441\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c, \u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u043e\u0448\u0438\u0431\u0443\u0441\u044c \u0432 \u0432\u044b\u0431\u043e\u0440\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430!&quot; \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9ca\/635\/eb8\/9ca635eb82ca175020376b7e06717607.png\" alt=\"image2.png\"><\/div>\n<p>  \u041d\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u0442\u043e\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u0413\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442, \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438 \u043f\u0430\u043c\u044f\u0442\u044c \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c <i>grey2palette<\/i> \u0438 <i>progresspalett<\/i> \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<h2>\u0420\u0430\u0437\u043d\u043e\u0435<\/h2>\n<p>  V570 The &#39;hdr-&gt;MagicNumber&#39; variable is assigned to itself. COMBUF.CPP 806<\/p>\n<pre><code class=\"cpp\">struct CommHdr {   unsigned short MagicNumber;   unsigned char Code;   unsigned long PacketID; } *hdr;  void CommBufferClass::Mono_Debug_Print(int refresh) {   ....   hdr = (CommHdr *)SendQueue[i].Buffer;   hdr-&gt;MagicNumber = hdr-&gt;MagicNumber;   hdr-&gt;Code = hdr-&gt;Code;   .... }<\/code><\/pre>\n<p>  \u0414\u0432\u0430 \u043f\u043e\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b CommHdr \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u041f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u043d\u0430 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437:<\/p>\n<ul>\n<li>V570 The &#39;hdr-&gt;Code&#39; variable is assigned to itself. COMBUF.CPP 807<\/li>\n<li>V570 The &#39;hdr-&gt;MagicNumber&#39; variable is assigned to itself. COMBUF.CPP 931<\/li>\n<li>V570 The &#39;hdr-&gt;Code&#39; variable is assigned to itself. COMBUF.CPP 932<\/li>\n<li>V570 The &#39;hdr-&gt;MagicNumber&#39; variable is assigned to itself. COMBUF.CPP 987<\/li>\n<li>V570 The &#39;hdr-&gt;Code&#39; variable is assigned to itself. COMBUF.CPP 988<\/li>\n<li>V570 The &#39;obj&#39; variable is assigned to itself. MAP.CPP 1132<\/li>\n<li>V570 The &#39;hdr-&gt;MagicNumber&#39; variable is assigned to itself. COMBUF.CPP 910<\/li>\n<li>V570 The &#39;hdr-&gt;Code&#39; variable is assigned to itself. COMBUF.CPP 911<\/li>\n<li>V570 The &#39;hdr-&gt;MagicNumber&#39; variable is assigned to itself. COMBUF.CPP 1040<\/li>\n<li>V570 The &#39;hdr-&gt;Code&#39; variable is assigned to itself. COMBUF.CPP 1041<\/li>\n<li>V570 The &#39;hdr-&gt;MagicNumber&#39; variable is assigned to itself. COMBUF.CPP 1104<\/li>\n<li>V570 The &#39;hdr-&gt;Code&#39; variable is assigned to itself. COMBUF.CPP 1105<\/li>\n<li>V570 The &#39;obj&#39; variable is assigned to itself. MAP.CPP 1279<\/li>\n<\/ul>\n<p>  V591 Non-void function should return a value. HEAP.H 123<\/p>\n<pre><code class=\"cpp\">int FixedHeapClass::Free(void * pointer);  template&lt;class T&gt; class TFixedHeapClass : public FixedHeapClass {   ....   virtual int Free(T * pointer) {FixedHeapClass::Free(pointer);}; };<\/code><\/pre>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>Free<\/i> \u043a\u043b\u0430\u0441\u0441\u0430 <i>TFixedHeapClass<\/i> \u043d\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>return<\/i>. \u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435, \u0447\u0442\u043e \u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>FixedHeapClass::Free<\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u0436\u0435 \u0442\u0438\u043f\u0430 <i>int<\/i>. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>return<\/i> \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  V672 There is probably no need in creating the new &#39;damage&#39; variable here. One of the function&#39;s arguments possesses the same name and this argument is a reference. Check lines: 1219, 1278. BUILDING.CPP 1278<\/p>\n<pre><code class=\"cpp\">ResultType BuildingClass::Take_Damage(int &amp; damage, ....) {   ....   if (tech &amp;&amp; tech-&gt;IsActive &amp;&amp; ....) {     int damage = 500;     tech-&gt;Take_Damage(damage, 0, WARHEAD_AP, source, forced);   }   .... }<\/code><\/pre>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 damage \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u0442\u0435\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041d\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0431\u044a\u044f\u0432\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>500<\/i> \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e damage, \u0430 \u043d\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u0440\u0443\u0433\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/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>V672 There is probably no need in creating the new &#39;damage&#39; variable here. One of the function&#39;s arguments possesses the same name and this argument is a reference. Check lines: 4031, 4068. TECHNO.CPP 4068<\/li>\n<\/ul>\n<p>  V762 It is possible a virtual function was overridden incorrectly. See first argument of function &#39;Occupy_List&#39; in derived class &#39;BulletClass&#39; and base class &#39;ObjectClass&#39;. BULLET.H 90<\/p>\n<pre><code class=\"cpp\">class ObjectClass : public AbstractClass {   ....   virtual short const * Occupy_List(bool placement=false) const; \/\/ &lt;=   virtual short const * Overlap_List(void) const;   .... };  class BulletClass : public ObjectClass,                     public FlyClass,                     public FuseClass {   ....   virtual short const * Occupy_List(void) const;                 \/\/ &lt;=   virtual short const * Overlap_List(void) const {return Occupy_List();};   .... };<\/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\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>Occupy_List<\/i>. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u043d\u0435 \u0442\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435.<\/p>\n<p>  \u0415\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0441\u0442:<\/p>\n<ul>\n<li>V762 It is possible a virtual function was overridden incorrectly. See qualifiers of function &#39;Ok_To_Move&#39; in derived class &#39;TurretClass&#39; and base class &#39;DriveClass&#39;. TURRET.H 76<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See fourth argument of function &#39;Help_Text&#39; in derived class &#39;HelpClass&#39; and base class &#39;DisplayClass&#39;. HELP.H 55<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See first argument of function &#39;Draw_It&#39; in derived class &#39;MapEditClass&#39; and base class &#39;HelpClass&#39;. MAPEDIT.H 187<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See first argument of function &#39;Occupy_List&#39; in derived class &#39;AnimClass&#39; and base class &#39;ObjectClass&#39;. ANIM.H 80<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See first argument of function &#39;Overlap_List&#39; in derived class &#39;BulletClass&#39; and base class &#39;ObjectClass&#39;. BULLET.H 102<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See qualifiers of function &#39;Remap_Table&#39; in derived class &#39;BuildingClass&#39; and base class &#39;TechnoClass&#39;. BUILDING.H 281<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See fourth argument of function &#39;Help_Text&#39; in derived class &#39;HelpClass&#39; and base class &#39;DisplayClass&#39;. HELP.H 58<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See first argument of function &#39;Overlap_List&#39; in derived class &#39;AnimClass&#39; and base class &#39;ObjectClass&#39;. ANIM.H 90<\/li>\n<\/ul>\n<p>  V763 Parameter &#39;coord&#39; is always rewritten in function body before being used. DISPLAY.CPP 4031<\/p>\n<pre><code class=\"cpp\">void DisplayClass::Set_Tactical_Position(COORDINATE coord) {   int xx = 0;   int yy = 0;    Confine_Rect(&amp;xx, &amp;yy, TacLeptonWidth, TacLeptonHeight,     Cell_To_Lepton(MapCellWidth) + GlyphXClientSidebarWidthInLeptons,     Cell_To_Lepton(MapCellHeight));    coord = XY_Coord(xx + Cell_To_Lepton(MapCellX), yy + Cell_To_Lepton(....));    if (ScenarioInit) {     TacticalCoord = coord;   }   DesiredTacticalCoord = coord;   IsToRedraw = true;   Flag_To_Redraw(false); }<\/code><\/pre>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>coord<\/i> \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u0435\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0421\u0442\u0430\u0440\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e\u0441\u044c. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b, \u0430 \u043e\u043d\u0430 \u043e\u0442 \u043d\u0438\u0445 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442. \u0410 \u0442\u0443\u0442 \u0435\u0449\u0451 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442.<\/p>\n<p>  \u0418 \u044d\u0442\u043e \u043c\u0435\u0441\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c:<\/p>\n<ul>\n<li>V763 Parameter &#39;coord&#39; is always rewritten in function body before being used. DISPLAY.CPP 4251<\/li>\n<\/ul>\n<p>  V507 Pointer to local array &#39;localpalette&#39; is stored outside the scope of this array. Such a pointer will become invalid. MAPSEL.CPP 757<\/p>\n<pre><code class=\"cpp\">extern &quot;C&quot; unsigned char *InterpolationPalette;  void Map_Selection(void) {   unsigned char localpalette[768];   ....   InterpolationPalette = localpalette;   .... }<\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0438\u0433\u0440 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \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. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432 \u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u044d\u0442\u043e \u0431\u044b\u043b \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430. \u041d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u043d \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043b\u043e\u0445\u0438\u043c \u0438 \u0434\u0430\u0436\u0435 \u043e\u043f\u0430\u0441\u043d\u044b\u043c.<\/p>\n<p>  \u0412 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c InterpolationPalette \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 localpalette, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u0415\u0449\u0451 \u043f\u0430\u0440\u043e\u0447\u043a\u0430 \u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u043c\u0435\u0441\u0442:<\/p>\n<ul>\n<li>V507 Pointer to local array &#39;localpalette&#39; is stored outside the scope of this array. Such a pointer will become invalid. MAPSEL.CPP 769<\/li>\n<li>V507 Pointer to local array &#39;buffer&#39; is stored outside the scope of this array. Such a pointer will become invalid. WINDOWS.CPP 458<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043e\u0442\u0447\u0451\u0442\u0435, \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043d\u043e\u0432\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. \u0412\u043e\u043e\u0431\u0449\u0435, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0433\u0440 \u0430\u043a\u0442\u0438\u0432\u043d\u043e <a href=\"https:\/\/www.viva64.com\/ru\/customers\/\">\u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u044e\u0442<\/a> PVS-Studio. \u0421\u0435\u0439\u0447\u0430\u0441 \u0431\u044e\u0434\u0436\u0435\u0442\u044b \u0438\u0433\u0440 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0435\u043b\u0438\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0438\u0448\u043d\u0438\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0430\u0433\u043e\u0432 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. \u0410 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430 \u0440\u0430\u043d\u043d\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u043e\u0442\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.<\/p>\n<p>  \u041f\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>  <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/510654\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/898\/3b6\/5a7\/8983b65a74adb29a2113eba12fbec3f1.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\/510654\/\">The Code of the Command &amp; Conquer Game: Bugs from the 90&#39;s. Volume two<\/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\/510656\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/510656\/<\/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\/510656\/\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/bf7\/c02\/794\/bf7c0279443646b677fedab55dfbe71f.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. \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432.  <\/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-306842","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306842","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=306842"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/306842\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=306842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=306842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=306842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}