{"id":215199,"date":"2014-03-10T17:12:03","date_gmt":"2014-03-10T13:12:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=215199"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=215199","title":{"rendered":"<span class=\"post_title\">\u041f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c CryEngine 3 SDK \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CppCat<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/6f7\/500\/d08\/6f7500d08764bc5395a6b926a00fe727.png\" alt=\"CryEngine 3 SDK and PVS-Studio\" align=\"left\"\/> <br \/>  \u041c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043a\u043e\u0434\u0430 CppCat, Cppcheck, PVS-Studio \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 Visual Studio 2013. \u0412 \u0445\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u0431\u043e\u043b\u0435\u0435 10 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0418 \u043f\u0440\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438. \u0412\u043e\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 CryEngine 3 SDK.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>CryEngine 3 SDK<\/h2>\n<p>  Wikipedia: <a href=\"http:\/\/www.viva64.com\/go.php?url=1355\">CryEngine 3 SDK<\/a> \u2014 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u0438\u0433\u0440 \u043d\u0430 \u0438\u0433\u0440\u043e\u0432\u043e\u043c \u0434\u0432\u0438\u0436\u043a\u0435 CryEngine 3. CryEngine 3 SDK, \u043a\u0430\u043a \u0438 CryEngine 3, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u0435\u0446\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Crytek. CryEngine 3 SDK \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u043c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c (freeware) \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043b\u044e\u0431\u043e\u0439 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0435 \u0438\u0433\u0440\u044b \u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u0445. \u041f\u0440\u0438 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0438 (\u043f\u0440\u043e\u0434\u0430\u0436\u0430\u0445) \u0438\u0433\u0440, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 CryEngine 3 SDK, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u043e\u043d\u043d\u044b\u0435 \u043e\u0442\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 Crytek.<\/p>\n<h2>CppCat<\/h2>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <a href=\"http:\/\/www.cppcat.com\/\">CppCat<\/a>.<\/p>\n<p>  \u041f\u043e\u0447\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CppCat, \u0430 \u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio? \u041f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u044f. \u0425\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e CppCat \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 PVS-Studio.<\/p>\n<p>  \u0414\u0430, PVS-Studio \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c 3 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e, \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u044d\u0442\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u043c\u0438 \u0434\u0435\u0444\u0435\u043a\u0442\u0430\u043c\u0438. \u041f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"cpp\">static void GetNameForFile(   const char* baseFileName,   const uint32 fileIdx,   char outputName[512] ) {   assert(baseFileName != NULL);   sprintf( outputName, &quot;%s_%d&quot;, baseFileName, fileIdx ); }<\/code><\/pre>\n<p>  V576 Incorrect format. Consider checking the fourth actual argument of the &#8216;sprintf&#8217; function. The SIGNED integer type argument is expected. igame.h 66<\/p>\n<p>  \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0434\u043b\u044f \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;fileIdx&#8217; \u043d\u0430\u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c &quot;%u&quot;. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c INT_MAX. \u0422\u0430\u043a \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0438\u043a\u0430\u043a \u0441\u0435\u0431\u044f \u043d\u0435 \u043f\u0440\u043e\u044f\u0432\u0438\u0442.<\/p>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435, \u0447\u0435\u043c CppCat \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 PVS-Studio \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &quot;<a href=\"http:\/\/www.viva64.com\/ru\/b\/0228\/\">\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 PVS-Studio \u0437\u0430 $250<\/a>&quot;.<\/p>\n<h2>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h2>\n<p>  \u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014 \u043d\u0430\u0434\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \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 \u043a\u043e\u0434\u0430. \u0418 \u0442\u043e\u0433\u0434\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0438 \u043c\u043d\u0435 \u043d\u0435 \u043e \u0447\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<h3>\u0414\u0432\u043e\u0439\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">void CVehicleMovementArcadeWheeled::InternalPhysicsTick(float dt) {   ....   if (fabsf(m_movementAction.rotateYaw)&gt;0.05f ||       vel.GetLengthSquared()&gt;0.001f ||       m_chassis.vel.GetLengthSquared()&gt;0.001f ||       angVel.GetLengthSquared()&gt;0.001f ||       angVel.GetLengthSquared()&gt;0.001f)    .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0090\/\">V501<\/a> There are identical sub-expressions &#8216;angVel.GetLengthSquared() &gt; 0.001f&#8217; to the left and to the right of the &#8216;||&#8217; operator. vehiclemovementarcadewheeled.cpp 3300<\/p>\n<p>  \u0414\u0432\u0430 \u0440\u0430\u0437\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u00abangVel.GetLengthSquared()&gt;0.001f\u00bb. \u041e\u0434\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043b\u0438\u0448\u043d\u044f\u044f. \u0418\u043b\u0438 \u044d\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430, \u0437\u0430-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<h3>\u041e\u0434\u043d\u043e \u0438 \u0442\u043e\u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445<\/h3>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N1.<\/b>  <\/p>\n<pre><code class=\"cpp\">void CVicinityDependentObjectMover::HandleEvent(....) {   ....   else if ( strcmp(szEventName, &quot;ForceToTargetPos&quot;) == 0 )   {     SetState(eObjectRangeMoverState_MovingTo);     SetState(eObjectRangeMoverState_Moved);     ActivateOutputPortBool( &quot;OnForceToTargetPos&quot; );   }   else if ( strcmp(szEventName, &quot;ForceToTargetPos&quot;) == 0 )   {     SetState(eObjectRangeMoverState_MovingTo);     SetState(eObjectRangeMoverState_Moved);     ActivateOutputPortBool( &quot;OnForceToTargetPos&quot; );   }   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0106\/\">V517<\/a> The use of &#8216;if (A) {&#8230;} else if (A) {&#8230;}&#8217; pattern was detected. There is a probability of logical error presence. Check lines: 255, 261. vicinitydependentobjectmover.cpp 255<\/p>\n<p>  \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Copy-Paste. \u0418 \u0435\u0449\u0451 \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0431\u044b\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N2. <\/b>\u041e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f ShouldGiveLocalPlayerHitableFeedbackOnCrosshairHoverForEntityClass(). \u0412\u043e\u0442 \u044d\u0442\u043e \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u0418\u041c\u042f!  <\/p>\n<pre><code class=\"cpp\">bool CGameRules:: ShouldGiveLocalPlayerHitableFeedbackOnCrosshairHoverForEntityClass (const IEntityClass* pEntityClass) const {   assert(pEntityClass != NULL);    if(gEnv-&gt;bMultiplayer)   {     return        (pEntityClass == s_pSmartMineClass) ||        (pEntityClass == s_pTurretClass) ||       (pEntityClass == s_pC4Explosive);   }   else   {     return        (pEntityClass == s_pSmartMineClass) ||        (pEntityClass == s_pTurretClass) ||       (pEntityClass == s_pC4Explosive);   } }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0112\/\">V523<\/a> The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. gamerules.cpp 5401<\/p>\n<p>  <b>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430:<\/b> <\/p>\n<ul>\n<li>environmentalweapon.cpp 964<\/li>\n<li>persistantstats.cpp 610<\/li>\n<li>persistantstats.cpp 714<\/li>\n<li>recordingsystem.cpp 8924<\/li>\n<li>movementtransitions.cpp 610<\/li>\n<li>gamerulescombicaptureobjective.cpp 1692<\/li>\n<li>vehiclemovementhelicopter.cpp 588<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u041d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">TDestructionEventId destructionEvents[2];  SDestructibleBodyPart()   : hashId(0)   , healthRatio(0.0f)   , minHealthToDestroyOnDeathRatio(0.0f) {   destructionEvents[0] = -1;   destructionEvents[0] = -1; }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0108\/\">V519<\/a> The &#8216;destructionEvents[0]&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 75, 76. bodydestruction.h 76<\/p>\n<p>  \u041c\u0430\u0441\u0441\u0438\u0432 &#8216;destructionEvents&#8217; \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0412 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u0445\u043e\u0442\u0435\u043b\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041d\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<h3>\u041d\u0435 \u0442\u0430\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u043a\u043e\u0431\u043a\u0443<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool ShouldRecordEvent(size_t eventID, IActor* pActor=NULL) const;  void CActorTelemetry::SubscribeToWeapon(EntityId weaponId) {   ....   else if(pMgr-&gt;ShouldRecordEvent(eSE_Weapon), pOwnerRaw)   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0257\/\">V639<\/a> Consider inspecting the expression for &#8216;ShouldRecordEvent&#8217; function call. It is possible that one of the closing &#8216;)&#8217; brackets was positioned incorrectly. actortelemetry.cpp 288<\/p>\n<p>  \u0420\u0435\u0434\u043a\u0430\u044f \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u041d\u0435 \u0442\u0430\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f\u0441\u044f \u0441\u043a\u043e\u0431\u043a\u0430.<\/p>\n<p>  \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 ShouldRecordEvent() \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f ShouldRecordEvent(). \u0417\u0430\u0442\u0435\u043c, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u044f\u0442\u0430\u044f &#8216;,&#8217; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0441 \u043f\u0440\u0430\u0432\u0430. \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;pOwnerRaw&#8217;.<\/p>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u0447\u0451\u0440\u0442\u0435 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<h3>\u0417\u0430\u0431\u044b\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">virtual void ProcessEvent(....) {   ....   string pMessage = (&quot;%s:&quot;, currentSeat-&gt;GetSeatName());   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0110\/\">V521<\/a> Such expressions using the &#8216;,&#8217; operator are dangerous. Make sure the expression &#8216;&quot;%s:&quot;, currentSeat-&gt;GetSeatName()&#8217; is correct. flowvehiclenodes.cpp 662<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 pMessage \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 currentSeat-&gt;GetSeatName(). \u041d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 &#8216;:&#8217;. \u0425\u043e\u0442\u044c \u0438 \u043c\u0435\u043b\u043e\u0447\u044c, \u043d\u043e \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  \u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b\u0442\u044c:  <\/p>\n<pre><code class=\"cpp\">string pMessage =   string().Format(&quot;%s:&quot;, currentSeat-&gt;GetSeatName());<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0411\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0438 \u0431\u0435\u0441\u043f\u043e\u0449\u0430\u0434\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h3>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N1.<\/b>  <\/p>\n<pre><code class=\"cpp\">inline bool operator != (const SEfResTexture &amp;m) const {   if (stricmp(m_Name.c_str(), m_Name.c_str()) != 0 ||       m_TexFlags != m.m_TexFlags ||        m_bUTile != m.m_bUTile ||       m_bVTile != m.m_bVTile ||       m_Filter != m.m_Filter ||       m_Ext != m.m_Ext ||       m_Sampler != m.m_Sampler)     return true;   return false; }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0139\/\">V549<\/a> The first argument of &#8216;stricmp&#8217; function is equal to the second argument. ishader.h 2089<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443, \u0442\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e. \u0421\u0442\u0440\u043e\u043a\u0430 m_Name.c_str() \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0430 \u0441 \u0441\u043e\u0431\u043e\u0439. \u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e:  <\/p>\n<pre><code class=\"cpp\">stricmp(m_Name.c_str(), m.m_Name.c_str())<\/code><\/pre>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N2. <\/b>\u0422\u0435\u043f\u0435\u0440\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:  <\/p>\n<pre><code class=\"cpp\">SearchSpotStatus GetStatus() const { return m_status; }  SearchSpot* SearchGroup::FindBestSearchSpot(....) {   ....   if(searchSpot.GetStatus() != Unreachable ||      searchSpot.GetStatus() != BeingSearchedRightAboutNow)   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0137\/\">V547<\/a> Expression is always true. Probably the &#8216;&amp;&amp;&#8217; operator should be used here. searchmodule.cpp 469<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044e:  <\/p>\n<pre><code class=\"cpp\">if (A != 1 || A != 2)<\/code><\/pre>\n<p>  \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N3.<\/b>   <\/p>\n<pre><code class=\"cpp\">const CCircularBufferTimeline * CCircularBufferStatsContainer::GetTimeline(   size_t inTimelineId) const {   ....   if (inTimelineId &gt;= 0 &amp;&amp; (int)inTimelineId &lt; m_numTimelines)   {     tl = &amp;m_timelines[inTimelineId];   }   else   {     CryWarning(VALIDATOR_MODULE_GAME,VALIDATOR_ERROR,                &quot;Statistics event %&quot; PRISIZE_T                 &quot; is larger than the max registered of %&quot;                 PRISIZE_T &quot;, event ignored&quot;,                inTimelineId,m_numTimelines);   }   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0137\/\">V547<\/a> Expression &#8216;inTimelineId &gt;= 0&#8217; is always true. Unsigned type value is always &gt;= 0. circularstatsstorage.cpp 31<\/p>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N4.<\/b>   <\/p>\n<pre><code class=\"cpp\">inline typename CryStringT&lt;T&gt;::size_type CryStringT&lt;T&gt;::rfind( value_type ch,size_type pos ) const {   const_str str;   if (pos == npos) {     ....   } else {     if (pos == npos)       pos = length();   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0169\/\">V571<\/a> Recurring check. The &#8216;if (pos == npos)&#8217; condition was already verified in line 1447. crystring.h 1453<\/p>\n<p>  \u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u00abpos = length()\u00bb \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e.<\/p>\n<p>  <b>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 \u0437\u0434\u0435\u0441\u044c: <\/b> cryfixedstring.h 1297<\/p>\n<h2>\u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/h2>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u044f\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u044e. \u0412\u043e\u0442 \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0438 \u0435\u0449\u0451 \u0437\u043d\u0430\u043b\u0438, \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u043e\u043d\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u043f\u043e\u0437\u0434\u043d\u043e.<\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044e \u0441\u043f\u0438\u0441\u043a\u043e\u043c.  <\/p>\n<pre><code class=\"cpp\">IScriptTable *p; bool Create( IScriptSystem *pSS, bool bCreateEmpty=false ) {   if (p) p-&gt;Release();   p = pSS-&gt;CreateTable(bCreateEmpty);   p-&gt;AddRef();   return (p)?true:false; }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0205\/\">V595<\/a> The &#8216;p&#8217; pointer was utilized before it was verified against nullptr. Check lines: 325, 326. scripthelpers.h 325<\/p>\n<p>  <b>\u041e\u0431\u0435\u0449\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 35 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<\/b> <a href=\"http:\/\/www.viva64.com\/external-pictures\/txt\/CryEngineSDK-595.txt\">CryEngineSDK-595.txt<\/a><\/p>\n<h3>\u041d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">void AddSample( T x ) {   m_index = ++m_index % N;   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0162\/\">V567<\/a> Undefined behavior. The &#8216;m_index&#8217; variable is modified while being used twice between sequence points. inetwork.h 2303<\/p>\n<h3>\u0426\u0438\u043a\u043b\u044b \u00ab\u043d\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437\u00bb<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">void CWeapon::AccessoriesChanged(bool initialLoadoutSetup) {   ....   for (int i = 0; i &lt; numZoommodes; i++)   {     CIronSight* pZoomMode = ....     const SZoomModeParams* pCurrentParams = ....     const SZoomModeParams* pNewParams = ....     if(pNewParams != pCurrentParams)     {       pZoomMode-&gt;ResetSharedParams(pNewParams);     }     break;   }   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0228\/\">V612<\/a> An unconditional &#8216;break&#8217; within a loop. weapon.cpp 2854<\/p>\n<p>  \u0422\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u2014 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &#8216;break&#8217;. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0432 \u0446\u0438\u043a\u043b\u0435 \u043d\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 &#8216;continue&#8217;.<\/p>\n<p>  <b>\u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0438\u043a\u043b\u043e\u0432<\/b>:<\/p>\n<ul>\n<li>gunturret.cpp 1647<\/li>\n<li>vehiclemovementbase.cpp 2362<\/li>\n<li>vehiclemovementbase.cpp 2382<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0421\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N1.<\/b>  <\/p>\n<pre><code class=\"cpp\">void CPlayerStateGround::OnPrePhysicsUpdate(....) {   ....   modifiedSlopeNormal.z = modifiedSlopeNormal.z;   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0168\/\">V570<\/a> The &#8216;modifiedSlopeNormal.z&#8217; variable is assigned to itself. playerstateground.cpp 227<\/p>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N2.<\/b>   <\/p>\n<pre><code class=\"cpp\">const SRWIParams&amp; Init(....) {   ....   objtypes=ent_all;   flags=rwi_stop_at_pierceable;   org=_org;   dir=_dir;   objtypes=_objtypes;   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0168\/\">V519<\/a> The &#8216;objtypes&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2807, 2808. physinterface.h 2808<\/p>\n<p>  \u0427\u043b\u0435\u043d\u0443 \u043a\u043b\u0430\u0441\u0441\u0430 &#8216;objtypes&#8217; \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  <b>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N3.<\/b>   <\/p>\n<pre><code class=\"cpp\">void SPickAndThrowParams::SThrowParams::SetDefaultValues() {   ....   maxChargedThrowSpeed = 20.0f;   maxChargedThrowSpeed = 15.0f; }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0108\/\">V519<\/a> The &#8216;maxChargedThrowSpeed&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1284, 1285. weaponsharedparams.cpp 1285<\/p>\n<p>  <b>\u0418 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0439<\/b> :<\/p>\n<ul>\n<li>The &#8216;bExecuteCommandLine&#8217; variable. Check lines: 628, 630. isystem.h 630<\/li>\n<li>The &#8216;flags&#8217; variable. Check lines: 2807, 2808. physinterface.h 2808<\/li>\n<li>The &#8216;entTypes&#8217; Variable. Check lines: 2854, 2856. physinterface.h 2856<\/li>\n<li>The &#8216;geomFlagsAny&#8217; variable. Check lines: 2854, 2857. physinterface.h 2857<\/li>\n<li>The &#8216;m_pLayerEffectParams&#8217; variable. Check lines: 762, 771. ishader.h 771<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u041d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u044b\u043c \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">void CGamePhysicsSettings::Debug(....) const {   ....   sprintf_s(buf, bufLen, pEntity-&gt;GetName());   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0235\/\">V618<\/a> It&#8217;s dangerous to call the &#8216;sprintf_s&#8217; function in such a manner, as the line being passed could contain format specification. The example of the safe code: printf(&quot;%s&quot;, str); gamephysicssettings.cpp 174<\/p>\n<p>  \u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u044d\u0442\u043e \u043d\u0435 \u043e\u0448\u0438\u0431\u043a\u0430, \u043d\u043e \u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043a\u043e\u0434. \u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432 \u0438\u043c\u0435\u043d\u0438 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b &#8216;%&#8217;, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<h3>\u041e\u0434\u0438\u043d\u043e\u043a\u0438\u0439 \u0441\u0442\u0440\u0430\u043d\u043d\u0438\u043a<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">CPersistantStats::SEnemyTeamMemberInfo *CPersistantStats::GetEnemyTeamMemberInfo(EntityId inEntityId) {   ....   insertResult.first-&gt;second.m_entityId;   .... }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0222\/\">V607<\/a> Ownerless expression &#8216;insertResult.first-&gt;second.m_entityId&#8217;. persistantstats.cpp 4814<\/p>\n<p>  \u041e\u0434\u0438\u043d\u043e\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442. \u041e\u0448\u0438\u0431\u043a\u0430? \u041d\u0435\u0434\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434? <\/p>\n<p>  <b>\u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u0432 \u043a\u043e\u0434\u0435: <\/b> recordingsystem.cpp 2671<\/p>\n<h3>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 new<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool CreateWriteBuffer(uint32 bufferSize) {   FreeWriteBuffer();   m_pWriteBuffer = new uint8[bufferSize];   if (m_pWriteBuffer)   {     m_bufferSize = bufferSize;     m_bufferPos = 0;     m_allocated = true;     return true;   }   return false; }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/d\/0293\/\">V668<\/a> There is no sense in testing the &#8216;m_pWriteBuffer&#8217; pointer against null, as the memory was allocated using the &#8216;new&#8217; operator. The exception will be generated in the case of memory allocation error. crylobbypacket.h 88<\/p>\n<p>  \u041a\u043e\u0434 \u0443\u0441\u0442\u0430\u0440\u0435\u043b. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &#8216;new&#8217; \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  <b>\u0414\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0441\u0442\u0430, \u0436\u0434\u0443\u0449\u0438\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/b>:<\/p>\n<ul>\n<li>cry_math.h 73<\/li>\n<li>datapatchdownloader.cpp 106<\/li>\n<li>datapatchdownloader.cpp 338<\/li>\n<li>game.cpp 1671<\/li>\n<li>game.cpp 4478<\/li>\n<li>persistantstats.cpp 1235<\/li>\n<li>sceneblurgameeffect.cpp 366<\/li>\n<li>killcamgameeffect.cpp 369<\/li>\n<li>downloadmgr.cpp 1090<\/li>\n<li>downloadmgr.cpp 1467<\/li>\n<li>matchmakingtelemetry.cpp 69<\/li>\n<li>matchmakingtelemetry.cpp 132<\/li>\n<li>matchmakingtelemetry.cpp 109<\/li>\n<li>telemetrycollector.cpp 1407<\/li>\n<li>telemetrycollector.cpp 1470<\/li>\n<li>telemetrycollector.cpp 1467<\/li>\n<li>telemetrycollector.cpp 1479<\/li>\n<li>statsrecordingmgr.cpp 1134<\/li>\n<li>statsrecordingmgr.cpp 1144<\/li>\n<li>statsrecordingmgr.cpp 1267<\/li>\n<li>statsrecordingmgr.cpp 1261<\/li>\n<li>featuretester.cpp 876<\/li>\n<li>menurender3dmodelmgr.cpp 1373<\/li>\n<\/ul>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<p>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442. \u0417\u0430\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435 \u0432 CryEngine 3 SDK, \u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u0434\u0432\u0438\u0436\u043a\u0435 CryEngine 3.<\/p>\n<p>  \u0416\u0435\u043b\u0430\u044e \u0432\u0441\u0435\u043c \u0431\u0435\u0437\u0431\u0430\u0436\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430!<\/p>\n<h2>P.S.<\/h2>\n<p>  \u041a\u0442\u043e-\u0442\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u0446\u0430\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e. \u0412\u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: <a href=\"http:\/\/www.viva64.com\/en\/b\/0240\/\">A Spin-off: CryEngine 3 SDK Checked with CppCat<\/a>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<h2>P.P.S.<\/h2>\n<p>  \u0427\u0430\u0441\u0442\u043e \u043a \u043d\u0430\u0448\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u0437\u0430\u0434\u0430\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043d\u0438\u0445 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0437\u0434\u0435\u0441\u044c: <a href=\"http:\/\/www.viva64.com\/ru\/a\/0085\/\">\u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e PVS-Studio \u0438 CppCat, \u0432\u0435\u0440\u0441\u0438\u044f 2014<\/a>.  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/company\/pvs-studio\/blog\/215199\/\"> http:\/\/habrahabr.ru\/company\/pvs-studio\/blog\/215199\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/6f7\/500\/d08\/6f7500d08764bc5395a6b926a00fe727.png\" alt=\"CryEngine 3 SDK and PVS-Studio\" align=\"left\"\/> <br \/>  \u041c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043a\u043e\u0434\u0430 CppCat, Cppcheck, PVS-Studio \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 Visual Studio 2013. \u0412 \u0445\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u0431\u043e\u043b\u0435\u0435 10 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u0418 \u043f\u0440\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438. \u0412\u043e\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 CryEngine 3 SDK.  <\/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-215199","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/215199","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=215199"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/215199\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=215199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=215199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=215199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}