{"id":217557,"date":"2014-03-30T09:53:02","date_gmt":"2014-03-30T05:53:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=217557"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=217557","title":{"rendered":"<span class=\"post_title\">\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430\u043c \u0434\u043e\u0432\u0435\u0440\u044f\u0439, \u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/572\/76a\/8bc\/57276a8bc032676a65a7e748ebd7b53c.png\" alt=\"PVS-Studio. You shall not pass!\" align=\"left\"\/><br \/>  \u042f \u0432\u0440\u0435\u043c\u0435\u043d\u0430\u043c\u0438 \u0431\u044b\u0432\u0430\u044e \u043e\u0437\u0430\u0434\u0430\u0447\u0435\u043d, \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0436\u0438\u0432\u0443\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0433\u043e\u0434\u0430\u043c\u0438. \u0421\u043c\u043e\u0442\u0440\u0438\u0448\u044c \u043d\u0430 \u0441\u043e\u0442\u043d\u044e \u043b\u044f\u043f\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435 \u0438 \u0443\u0434\u0438\u0432\u043b\u044f\u0435\u0448\u044c\u0441\u044f, \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418 \u0432\u0435\u0434\u044c \u043a\u0430\u043a-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0415\u0439 \u0434\u0430\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u041f\u0440\u0438\u0447\u0435\u043c, \u044f \u0433\u043e\u0432\u043e\u0440\u044e \u043d\u0435 \u043e \u043a\u043e\u0434\u0435, \u0440\u0438\u0441\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u043a\u0435\u043c\u043e\u043d\u0430 \u0432 \u0438\u0433\u0440\u0435. \u0410, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445. \u0414\u0430, \u0432\u044b \u0432\u0435\u0440\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043a\u043e\u0434\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Scilab.<br \/>  <a name=\"habracut\"><\/a>   <\/p>\n<h2>Scilab<\/h2>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430 \u0432 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435 Scilab. \u0410\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <a href=\"http:\/\/www.viva64.com\/ru\/pvs-studio\/\">PVS-Studio<\/a>.<\/p>\n<p>  Scilab \u2014 \u043f\u0430\u043a\u0435\u0442 \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043c\u043e\u0449\u043d\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043d\u044b\u0445 (\u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445) \u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0440\u0430\u0441\u0447\u0451\u0442\u043e\u0432 [<a href=\"http:\/\/www.viva64.com\/go.php?url=1367\">Wikipedia<\/a>].<\/p>\n<p>  \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442: <a href=\"http:\/\/www.scilab.org\/\">http:\/\/www.scilab.org\/<\/a><\/p>\n<p>  \u0412 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>2D \u0438 3D \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f;<\/li>\n<li>\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0430\u043b\u0433\u0435\u0431\u0440\u0430, \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b (sparse matrices);<\/li>\n<li>\u043f\u043e\u043b\u0438\u043d\u043e\u043c\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438;<\/li>\n<li>\u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f, \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044f;<\/li>\n<li>\u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u044f: \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u041e\u0414\u0423 \u0438 \u0414\u0423;<\/li>\n<li>Scicos: \u0433\u0438\u0431\u0440\u0438\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0438 \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438;<\/li>\n<li>\u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438;<\/li>\n<li>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432;<\/li>\n<li>\u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430;<\/li>\n<li>\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430;<\/li>\n<li>\u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u043e\u0439;<\/li>\n<li>\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a Fortran, Tcl\/Tk, C, C++, Java, LabVIEW.<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435\u0441\u044c. \u0421\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u0438\u043d\u043d\u0430\u044f. \u042f \u0432\u0435\u0434\u044c \u043d\u0435 \u0432\u0438\u043d\u043e\u0432\u0430\u0442, \u0447\u0442\u043e \u0442\u0443\u0442 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u043a\u043e\u0441\u0442\u0435\u0439. \u0418 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043a \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0441\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0440\u0430\u0437 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d \u044f\u0437\u044b\u043a \u0421\u0438++, \u043d\u0430\u0434\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430\u0445, \u0431\u044b\u0432\u0430\u044e\u0442 \u0435\u0449\u0451 \u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043b\u044f\u043f\u044b. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0441\u044f \u0435\u043c\u0443 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0438\u043b\u0438 \u043e\u043d \u0441\u0442\u0430\u043d\u0435\u0442 \u0436\u0435\u0440\u0442\u0432\u043e\u0439 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>  \u0414\u0430, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u044b \u043e\u0448\u0438\u0431\u043e\u043a. \u041d\u043e \u0440\u0430\u0437 \u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0437\u0430\u0447\u0435\u043c \u0441\u0435\u0431\u0435 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0442\u0430\u043a\u043e\u043c \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0438. \u041b\u0443\u0447\u0448\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0451 10% \u043e\u0448\u0438\u0431\u043e\u043a, \u0447\u0435\u043c \u0432\u043e\u0432\u0441\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043c\u043d\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Scilab.<\/p>\n<h2>\u0411\u0443\u0444\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/434\/968\/bcd\/434968bcd5f4a657e5d498e0b433589c.png\" alt=\"\u0411\u0443\u0444\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442\"\/>  <\/p>\n<pre><code class=\"cpp\">int sci_champ_G(....) {   ....   char * strf = NULL ;   ....   if ( isDefStrf( strf ) )   {     char strfl[4];     strcpy(strfl,DEFSTRFN);     strf = strfl;     if ( !isDefRect( rect ) )     {       strf[1]='5';     }   }    (*func)(stk(l1), stk(l2), stk(l3), stk(l4),     &amp;m3, &amp;n3, strf, rect, arfact, 4L);   ....   }<\/code><\/pre>\n<p>  \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 PVS-Studio: V507 Pointer to local array &#8216;strfl&#8217; is stored outside the scope of this array. Such a pointer will become invalid. sci_champ.c 103<\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 &#8216;strfl&#8217; \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;strf&#8217;. \u041f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u0431\u043b\u043e\u043a\u0430 \u00abif () {\u2026 }\u00bb \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c &#8216;strf&#8217;. <\/p>\n<p>  \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e. \u041d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0436\u0435 \u043d\u0435\u0442. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u043e \u0432\u0435\u0437\u0435\u043d\u0438\u0435. \u041f\u0430\u043c\u044f\u0442\u044c, \u0433\u0434\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432, \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043d\u044f\u0442\u0430 \u043f\u043e\u0434 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ul>\n<li>Array &#8216;strfl&#8217;. sci_fec.c 111<\/li>\n<li>Array &#8216;strfl&#8217;. sci_grayplot.c 94<\/li>\n<li>Array &#8216;strfl&#8217;. sci_matplot.c 84<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0427\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0438<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">int C2F(pmatj)   (char *fname, int *lw, int *j, unsigned long fname_len) {   ....   ix1 = il2 + 4;   m2 = Max(m, 1);   ix1 = il + 9 + m * n;   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V519 The &#8216;ix1&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 2387, 2389. stack1.c 2389<\/p>\n<p>  \u0421 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;ix1&#8217; \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043b\u0430\u0434\u043d\u043e. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0437\u0434\u0435\u0441\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430. <\/p>\n<h2>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0437\u0430\u0442\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/1c3\/013\/004\/1c3013004eff5227575295aaad553e38.png\" alt=\"\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0437\u0430\u0442\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\"\/><\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430. \u041d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438\u0445. \u041d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.  <\/p>\n<pre><code class=\"cpp\">int sci_Playsound (char *fname,unsigned long fname_len) {   ....   int m1 = 0, n1 = 0;   ....   if ( (m1 != n1) &amp;&amp; (n1 != 1) )    {     Scierror(999,_(&quot;%s: Wrong size for input argument #%d: &quot;)                  _(&quot;A string expected.\\n&quot;),fname,1);     return 0;   }   sciErr = getMatrixOfWideString(pvApiCtx, piAddressVarOne,              &amp;m1,&amp;n1,&amp;lenStVarOne, NULL);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f PVS-Studio: V560 A part of conditional expression is always false: (m1 != n1). sci_playsound.c 66; V560 A part of conditional expression is always true: (n1 != 1). sci_playsound.c 66<\/p>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 m1 \u0438 n1 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 getMatrixOfWideString(). \u041f\u043e\u0442\u043e\u043c \u044d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u044b. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0442\u0430\u043a, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 getMatrixOfWideString().<\/p>\n<p>  \u0412 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 m1 \u0438 n1 \u0440\u0430\u0432\u043d\u044b 0. \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u00abif ( (m1 != n1) &amp;&amp; (n1 != 1) )\u00bb \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043f\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. <\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e. \u041d\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 m1 \u0438 n1.<\/p>\n<h2>\u041c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0447\u0438\u0441\u043b\u0430<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/894\/3ef\/92f\/8943ef92fac47c7580eab972d17b2998.png\" alt=\"\u0412\u043e\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 \u0434\u0440\u0443\u0433\"\/>  <\/p>\n<pre><code class=\"cpp\">void CreCommon(f,var)      FILE *f;      VARPTR var; {   ....   if ( strncmp(var-&gt;fexternal, &quot;cintf&quot;, 4)==0 )   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V666 Consider inspecting third argument of the function &#8216;strncmp&#8217;. It is possible that the value does not correspond with the length of a string which was passed with the second argument. crerhs.c 119<\/p>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0447\u0438\u0441\u043b\u043e 4. \u0418 \u044d\u0442\u043e \u0447\u0438\u0441\u043b\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435. \u0412 \u0441\u0442\u0440\u043e\u043a\u0435 \u00abcintf\u00bb \u043f\u044f\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0430 \u043d\u0435 \u0447\u0435\u0442\u044b\u0440\u0435. \u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>  \u042f \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u043b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u043a\u0440\u043e\u0441 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0434\u043b\u0438\u043d\u044b \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u043e\u0432 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0431\u044b \u0435\u0433\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cpp\">if ( strncmp(var-&gt;fexternal, &quot;cintf&quot;, litlen(&quot;cintf&quot;))==0 )<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043c\u0430\u043a\u0440\u043e\u0441 &#8216;litlen&#8217;, \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u0415\u0441\u0442\u044c \u043c\u0430\u0441\u0441\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u0432\u043a\u0443\u0441. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0441\u0442\u0440\u043e\u043a:<\/p>\n<ul>\n<li>crerhs.c 121<\/li>\n<li>crerhs.c 123<\/li>\n<li>crerhs.c 125<\/li>\n<li>crerhs.c 127<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>1, 2, 3, 4, 4, 6<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/ba5\/884\/109\/ba5884109e2aa4f939f95d87d91a9a95.png\" alt=\"\u041c\u0430\u0441\u0441\u0438\u0432, \u0434\u044b\u0440\u043a\u0430.\"\/>  <\/p>\n<pre><code class=\"cpp\">int C2F(run)(void) {   ....   static int *Lpt = C2F(iop).lpt - 1;   ....   Lpt[1] = Lin[1 + k];   Lpt[2] = Lin[2 + k];   Lpt[3] = Lin[3 + k];   Lpt[4] = Lin[4 + k];   Lct[4] = Lin[6 + k ];   Lpt[6] = k;   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V525 The code containing the collection of similar blocks. Check items &#8216;1&#8217;, &#8216;2&#8217;, &#8216;3&#8217;, &#8216;4&#8217;, &#8216;4&#8217; in lines 1005, 1006, 1007, 1008, 1009. run.c 1005<\/p>\n<p>  \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0447\u0438\u0441\u0435\u043b. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c. \u041c\u043e\u0436\u043d\u043e \u043c\u0430\u0441\u0441\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c.<\/p>\n<h2>\u042d\u0432\u043e\u043b\u044e\u0446\u0438\u044f \u043a\u043e\u0434\u0430<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/3d1\/907\/13c\/3d190713c4eb2fc16699ed510b81b0fc.png\" alt=\"\u042d\u0432\u043e\u043b\u044e\u0446\u0438\u044f\"\/>  <\/p>\n<pre><code class=\"cpp\">int write_xml_states(   int nvar, const char * xmlfile, char **ids, double *x) {   ....   FILE *fd = NULL;   ....   wcfopen(fd, (char*)xmlfile, &quot;wb&quot;);   if (fd &lt; 0)   {     sciprint(_(&quot;Error: cannot write to  '%s'  \\n&quot;), xmlfile);     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V503 This is a nonsensical comparison: pointer &lt; 0. scicos.c 5826<\/p>\n<p>  \u042f \u043f\u043e\u0447\u0442\u0438 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0444\u0430\u0439\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <a href=\"http:\/\/www.viva64.com\/go.php?url=1368\">open<\/a>. \u0417\u0430\u0442\u0435\u043c, \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0438 \u0438 \u0441\u0442\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 <a href=\"http:\/\/www.viva64.com\/go.php?url=1369\">_wfopen<\/a>. \u0415\u0451 \u0432\u044b\u0437\u043e\u0432 \u0441\u043f\u0440\u044f\u0442\u0430\u043d \u0432 \u043c\u0430\u043a\u0440\u043e\u0441 &#8216;wcfopen&#8217;.<\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0431\u044b\u043b\u0438. \u0424\u0443\u043d\u043a\u0446\u0438\u044f open() \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 -1. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0436\u0435, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0443\u043b\u044f, \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u043f\u0440\u043e\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f.  <\/p>\n<pre><code class=\"cpp\">void taucs_ccs_genmmd(taucs_ccs_matrix* m,   int** perm, int** invperm) {   int  n, maxint, delta, nofsub;   ....   maxint = 32000;   assert(sizeof(int) == 4);   maxint = 2147483647; \/* 2**31-1, for 32-bit only! *\/   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V519 The &#8216;maxint&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 154, 157. taucs_scilab.c 157<\/p>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0438 \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442, \u043d\u043e \u043a\u043e\u0434 \u0437\u0430\u0431\u0430\u0432\u0435\u043d.<\/p>\n<p>  \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0432\u043d\u044b\u043c-\u0434\u0430\u0432\u043d\u043e, \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u00abmaxint = 32000;\u00bb. \u0417\u0430\u0442\u0435\u043c \u043d\u0438\u0436\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"cpp\">assert(sizeof(int) == 4); maxint = 2147483647; \/* 2**31-1, for 32-bit only! *\/<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/www.viva64.com\/media\/images\/content\/b\/0244_Trust_but_Verify_ru\/image7.jpg\" alt=\"\u0421\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442\"\/>  <\/p>\n<pre><code class=\"cpp\">char *getCommonPart(char **dictionary, int sizeDictionary) {   ....   char *currentstr = dictionary[0];   qsort(dictionary, sizeof dictionary \/ sizeof dictionary[0],         sizeof dictionary[0], cmp);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V514 Dividing sizeof a pointer &#8216;sizeof dictionary&#8217; by another value. There is a probability of logical error presence. getcommonpart.c 76<\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 qsort() \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435. \u0418\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0432\u043d\u043e \u043e\u0434\u043d\u043e\u043c\u0443.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u00absizeof dictionary \/ sizeof dictionary[0]\u00bb. \u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0432\u0435\u043d \u0435\u0434\u0438\u043d\u0438\u0446\u0435.<\/p>\n<p>  \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"cpp\">qsort(dictionary, sizeDictionary, sizeof dictionary[0], cmp);<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0437\u0434\u0435\u0441\u044c: getfilesdictionary.c 105<\/p>\n<h2>\u0423\u043f\u0440\u044f\u043c\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">void GetenvB(char *name, char *env, int len) {   int ierr = 0, one = 1;   C2F(getenvc)(&amp;ierr,name,env,&amp;len,&amp;one);   if (ierr == 0)    {     char *last = &amp;env[len-1];     while ( *last == ' ' ) { last = '\\0' ; }      last--;   }   .... }  <\/code><\/pre>\n<p>  V527 It is odd that the &#8216;\\0&#8217; value is assigned to &#8216;char&#8217; type pointer. Probably meant: *last = &#8216;\\0&#8217;. getenvb.c 24<\/p>\n<p>  \u042d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0443\u0436\u0430\u0441\u043d\u0430. \u0418\u043b\u0438 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0430, \u0435\u0441\u043b\u0438 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043a\u0430\u0445.  <\/p>\n<pre><code class=\"cpp\">while ( *last == ' ' ) { last = '\\0' ; }<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0440\u043e\u0431\u0435\u043b, \u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0441\u0442\u0430\u043d\u0435\u0442 \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e. \u0414\u0430\u043b\u0435\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u043c\u0443 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e.<\/p>\n<p>  \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043d\u0430 &#8216;\\0&#8217;. \u0422\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"cpp\">while ( *last == ' ' ) { *last++ = '\\0' ; }<\/code><\/pre>\n<p>  \u0417\u0430\u0431\u0430\u0432\u043d\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u0432 \u043a\u043e\u0434\u0435, \u0433\u0434\u0435 \u0442\u043e\u0436\u0435 \u0445\u043e\u0442\u044f\u0442 \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u043d\u0430 \u043d\u0443\u043b\u0438. \u0418 \u0435\u0433\u043e \u0442\u043e\u0436\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.  <\/p>\n<pre><code class=\"cpp\">static int msg_101(int *n, int *ierr) {   ....   for (i=0;i&lt;(int)strlen(line);i++)   {     if (line[i]==' ') line[i]='\\0';     break;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V612 An unconditional &#8216;break&#8217; within a loop. msgs.c 1293<\/p>\n<p>  \u0412\u0441\u0451 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u043d\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &#8216;break&#8217;. \u0411\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0451\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0431\u0435\u043b. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0435\u0441\u043b\u0438 \u0443\u0431\u0440\u0430\u0442\u044c &#8216;break&#8217; \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442. \u0424\u0443\u043d\u043a\u0446\u0438\u044f strlen() \u0432\u0435\u0440\u043d\u0451\u0442 \u043d\u043e\u043b\u044c, \u0438 \u0446\u0438\u043a\u043b \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u00ab\u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0435\u00bb \u0446\u0438\u043a\u043b\u044b:<\/p>\n<ul>\n<li>V612 An unconditional &#8216;break&#8217; within a loop. msgs.c 1313<\/li>\n<li>V612 An unconditional &#8216;break&#8217; within a loop. api_common.cpp 1407<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0420\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/79d\/923\/47b\/79d92347b4e52ba36b59109c175a0c85.png\" alt=\"\u0420\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\"\/>  <\/p>\n<pre><code class=\"cpp\">char **splitLineCSV(....) {   ....   if (retstr[curr_str] == NULL)   {     *toks = 0;     FREE(substitutedstring);     substitutedstring = NULL;     freeArrayOfString(retstr, strlen(substitutedstring));     return NULL;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V575 The null pointer is passed into &#8216;strlen&#8217; function. Inspect the first argument. splitline.c 107<\/p>\n<p>  \u0421\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u044f\u0432\u043d\u043e \u043e\u0431\u043d\u0443\u043b\u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c &#8216;substitutedstring&#8217;. \u0417\u0430\u0442\u0435\u043c, \u043e\u0442\u0434\u0430\u043b\u0438 \u0435\u0433\u043e \u043d\u0430 \u0440\u0430\u0441\u0442\u0435\u0440\u0437\u0430\u043d\u0438\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e strlen().<\/p>\n<p>  \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 freeArrayOfString() \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0432\u044b\u0437\u043e\u0432 FREE().<\/p>\n<p>  \u042d\u0442\u043e \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u043c\u0438\u043d\u043a\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439.  <\/p>\n<pre><code class=\"cpp\">inline static void create(void * pvApiCtx, const int position,   const int rows, const int cols, long long * ptr) {   int * dataPtr = 0;   alloc(pvApiCtx, position, rows, cols, dataPtr);   for (int i = 0; i &lt; rows * cols; i++)   {     dataPtr[i] = static_cast&lt;int&gt;(ptr[i]);   } }<\/code><\/pre>\n<p>  V522 Dereferencing of the null pointer &#8216;dataPtr&#8217; might take place. scilababstractmemoryallocator.hxx 222<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0445\u043e\u0442\u044f\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e alloc(). \u041c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c &#8216;dataPtr&#8217;. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u043d\u0435\u0433\u043e \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0431\u0443\u0444\u0435\u0440 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f alloc():  <\/p>\n<pre><code class=\"cpp\">inline static int *alloc(   void * pvApiCtx, const int position, const int rows,   const int cols, int * ptr)<\/code><\/pre>\n<p>  \u0412\u0438\u0434\u0438\u0442\u0435, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u043e\u0439. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0437\u0430\u0447\u0435\u043c \u043e\u043d \u043d\u0443\u0436\u0435\u043d. \u0417\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 alloc():  <\/p>\n<pre><code class=\"cpp\">inline static int *alloc(   void * pvApiCtx, const int position, const int rows,   const int cols, int * ptr) {   int * _ptr = 0;   SciErr err = allocMatrixOfInteger32(     pvApiCtx, position, rows, cols, &amp;_ptr);   checkError(err);   return _ptr; }<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 &#8216;ptr&#8217; \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0434 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0435\u0432\u0435\u0440\u0435\u043d. \u041a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"cpp\">inline static void create(void * pvApiCtx, const int position,   const int rows, const int cols, long long * ptr) {   int *dataPtr = alloc(pvApiCtx, position, rows, cols, 0);   for (int i = 0; i &lt; rows * cols; i++)   {     dataPtr[i] = static_cast&lt;int&gt;(ptr[i]);   } }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>scilababstractmemoryallocator.hxx 237<\/li>\n<li>scilababstractmemoryallocator.hxx 401<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445<\/h2>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0447\u0430\u0441\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0440\u0435\u0434\u043a\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u0434\u043e\u043b\u0433\u0443 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c\u0438. \u042f \u0434\u0443\u043c\u0430\u044e, \u0438\u0437-\u0437\u0430 \u0442\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u044b \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0436\u0435 \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u043d\u0435 \u0442\u0430\u043a. \u0412\u044b\u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435:  <\/p>\n<pre><code class=\"cpp\">static SciErr fillCommonSparseMatrixInList(....) {   ....   addErrorMessage(&amp;sciErr, API_ERROR_FILL_SPARSE_IN_LIST,    _(&quot;%s: Unable to create list item #%d in Scilab memory&quot;),    _iComplex ? &quot;createComplexSparseMatrixInList&quot; :                &quot;createComplexSparseMatrixInList&quot;,    _iItemPos + 1);   .... }<\/code><\/pre>\n<p>  \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 PVS-Studio: V583 The &#8216;?:&#8217; operator, regardless of its conditional expression, always returns one and the same value: \u00abcreateComplexSparseMatrixInList\u00bb. api_list.cpp 2398<\/p>\n<p>  \u0412 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;_iComplex&#8217;, \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u043e \u00abcreateComplexSparseMatrixInList\u00bb.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e:<\/p>\n<ul>\n<li>api_list.cpp 2411<\/li>\n<li>api_list.cpp 2418<\/li>\n<li>api_list.cpp 2464<\/li>\n<li>api_list.cpp 2471<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"cpp\">#define __GO_FIGURE__ 9 #define __GO_UIMENU__ 21 int sci_uimenu(char *fname, unsigned long fname_len) {   ....   if (iParentType == __GO_FIGURE__ &amp;&amp;       iParentType == __GO_UIMENU__)   {     Scierror(999, _(&quot;%s: Wrong type for input argument #%d: &quot;)              _(&quot;A '%s' or '%s' handle expected.\\n&quot;),               fname, 1, &quot;Figure&quot;, &quot;Uimenu&quot;);     return FALSE;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 Expression &#8216;iParentType == 9 &amp;&amp; iParentType == 21&#8217; is always false. Probably the &#8216;||&#8217; operator should be used here. sci_uimenu.c 99<\/p>\n<p>  \u0423\u0441\u043b\u043e\u0432\u0438\u0435 (iParentType == __GO_FIGURE__ &amp;&amp; iParentType == __GO_UIMENU__) \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0432\u043d\u0430 \u0447\u0438\u0441\u043b\u0443 9 \u0438 \u0447\u0438\u0441\u043b\u0443 21. \u042f \u0434\u0443\u043c\u0430\u044e, \u0437\u0434\u0435\u0441\u044c \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cpp\">if (iParentType != __GO_FIGURE__ &amp;&amp;     iParentType != __GO_UIMENU__)<\/code><\/pre>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u0438\u043d, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u043b\u0430\u0434\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.  <\/p>\n<pre><code class=\"cpp\">int set_view_property(....) {   BOOL status = FALSE;   ....   status = setGraphicObjectProperty(     pobjUID, __GO_VIEW__, &amp;viewType, jni_int, 1);    if (status = TRUE)   {     return SET_PROPERTY_SUCCEED;   }   else   {     Scierror(999, _(&quot;'%s' property does not exist &quot;)       _(&quot;for this handle.\\n&quot;), &quot;view&quot;);     return  SET_PROPERTY_ERROR ;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V559 Suspicious assignment inside the condition expression of &#8216;if&#8217; operator: status = 1. set_view_property.c 61<\/p>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0434\u0435\u0441\u044c: \u00abif (status = TRUE)\u00bb. \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435.<\/p>\n<h2>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u0430<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/cf4\/4ee\/64b\/cf44ee64b241230b263aa8d31097a84d.png\" alt=\"\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u0430\"\/><\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c. \u0412\u0438\u0434\u0438\u043c\u043e, \u043e\u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Copy-Paste, \u0438 \u0432 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0447\u0442\u043e-\u0442\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c.  <\/p>\n<pre><code class=\"cpp\">static int uf_union  (int* uf, int s, int t) {   if (uf_find(uf,s) &lt; uf_find(uf,t))    {     uf[uf_find(uf,s)] = uf_find(uf,t);      return (uf_find(uf,t));    }   else   {     uf[uf_find(uf,s)] = uf_find(uf,t);      return (uf_find(uf,t));    } }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V523 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. taucs_scilab.c 700<\/p>\n<p>  \u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0440\u0443\u0433\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f. \u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:  <\/p>\n<pre><code class=\"cpp\">int sci_xset( char *fname, unsigned long fname_len ) {   ....   else if ( strcmp(cstk(l1), &quot;mark size&quot;) == 0)   ....   else if ( strcmp(cstk(l1), &quot;mark&quot;) == 0)     ....   else if ( strcmp(cstk(l1), &quot;mark&quot;) == 0)   ....   else if ( strcmp(cstk(l1), &quot;colormap&quot;) == 0)   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V517 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: 175, 398. sci_xset.c 175<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439:<\/p>\n<ul>\n<li>sci_xset.c 159<\/li>\n<li>h5_readdatafromfile_v1.c 1148 <\/li>\n<li>h5_readdatafromfile.c 1010<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041a\u043b\u0430\u0441\u0441\u0438\u043a\u0430<\/h2>\n<p>  \u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0441\u0430\u043c\u044b\u0439 \u0447\u0430\u0441\u0442\u044b\u0439 \u043b\u044f\u043f \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0421\u0438\/\u0421\u0438++. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 \u0443\u0436\u0435 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u044e. \u042d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043e\u0448\u0438\u0431\u043a\u0435. \u041d\u043e \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0435, \u043e\u043d\u043e \u0438 \u0435\u0441\u0442\u044c \u0431\u0435\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0435.  <\/p>\n<pre><code class=\"cpp\">static void appendData(....) {   ....   sco_data *sco = (sco_data *) * (block-&gt;work);   int maxNumberOfPoints = sco-&gt;internal.maxNumberOfPoints;   int numberOfPoints = sco-&gt;internal.numberOfPoints;      if (sco != NULL &amp;&amp; numberOfPoints &gt;= maxNumberOfPoints)   .... }  <\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V595 The &#8216;sco&#8217; pointer was utilized before it was verified against nullptr. Check lines: 305, 311. canimxy3d.c 305<\/p>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0447\u043b\u0435\u043d\u0430\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c &#8216;sco&#8217;:  <\/p>\n<pre><code class=\"cpp\">int maxNumberOfPoints = sco-&gt;internal.maxNumberOfPoints; int numberOfPoints = sco-&gt;internal.numberOfPoints;<\/code><\/pre>\n<p>  \u0410 \u043f\u043e\u0442\u043e\u043c \u0432\u0434\u0440\u0443\u0433 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c:  <\/p>\n<pre><code class=\"cpp\">if (sco != NULL .....<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0435\u0449\u0451 61 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 V595. \u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430. \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u0438\u0445 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c: <a href=\"http:\/\/www.viva64.com\/external-pictures\/txt\/scilab-v595.txt\">scilab-v595.txt<\/a>.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 (format specifiers) \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 sprintf() \u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u0435\u0439. \u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u0448\u043b\u043e\u0441\u044c, \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u041f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u0441\u043f\u0438\u0441\u043a\u043e\u043c: <a href=\"http:\/\/www.viva64.com\/external-pictures\/txt\/scilab-v576.txt\">scilab-v576.txt<\/a>.<\/p>\n<p>  \u0418\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442 \u044d\u0442\u043e:  <\/p>\n<pre><code class=\"cpp\">#define FORMAT_SESSION &quot;%s%s%s&quot; char *getCommentDateSession(BOOL longFormat) {   ....   sprintf(line, FORMAT_SESSION, SESSION_PRAGMA_BEGIN,           STRING_BEGIN_SESSION, time_str, SESSION_PRAGMA_END);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V576 Incorrect format. A different number of actual arguments is expected while calling &#8216;sprintf&#8217; function. Expected: 5. Present: 6. getcommentdatesession.c 68<\/p>\n<p>  \u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 SESSION_PRAGMA_END.<\/p>\n<h2>\u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/7cf\/c8a\/512\/7cfc8a5124c8ca08f23823920370878c.png\" alt=\"\u041e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u042d\u0442\u043e \u0421++!\"\/>  <\/p>\n<pre><code class=\"cpp\">short ezxml_internal_dtd(ezxml_root_t root, char *s, size_t len) {   ....   while (*(n = ++s + strspn(s, EZXML_WS)) &amp;&amp; *n != '&gt;') {   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V567 Undefined behavior. The &#8216;s&#8217; variable is modified while being used twice between sequence points. ezxml.c 385<\/p>\n<p>  \u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 &quot;++s&#8217; \u0438\u043b\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u00abstrspn(s, EZXML_WS)\u00bb. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445, \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0439, \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0417\u0434\u0435\u0441\u044c \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0438\u0437-\u0437\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438.  <\/p>\n<pre><code class=\"cpp\">static char **replaceStrings(....) {   ....   int i = 0;   ....   for (i = 0; i &lt; nr; i = i++)   .... }<\/code><\/pre>\n<p>  V567 Undefined behavior. The &#8216;i&#8217; variable is modified while being used twice between sequence points. csvread.c 620<\/p>\n<p>  \u0411\u0435\u0434\u0430 \u0437\u0434\u0435\u0441\u044c: i = i++.<\/p>\n<p>  \u041f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cpp\">for (i = 0; i &lt; nr; i++)<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0415\u0449\u0451 \u043e \u0441\u0442\u0440\u043e\u043a\u0430\u0445<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">char *PLD_strtok(....) {   ....   if ((st-&gt;start)&amp;&amp;(st-&gt;start != '\\0'))   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V528 It is odd that pointer to &#8216;char&#8217; type is compared with the &#8216;\\0&#8217; value. Probably meant: *st-&gt;start != &#8216;\\0&#8217;. pldstr.c 303<\/p>\n<p>  \u0425\u043e\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043f\u0443\u0441\u0442\u0430\u044f. \u041d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 NULL. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"cpp\">if ((st-&gt;start)&amp;&amp;(st-&gt;start[0] != '\\0'))<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043b\u044f\u043f:<\/p>\n<p>  V528 It is odd that pointer to &#8216;char&#8217; type is compared with the &#8216;\\0&#8217; value. Probably meant: ** category == &#8216;\\0&#8217;. sci_xcospalload.cpp 57<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435\u0434\u043e\u043f\u0438\u0441\u0430\u043d:  <\/p>\n<pre><code class=\"cpp\">int sci_displaytree(char *fname, unsigned long fname_len) {   ....   string szCurLevel = &quot;&quot;;   ....   \/\/Add node level   if (szCurLevel != &quot;&quot;)   {     szCurLevel + &quot;.&quot;;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V655 The strings was concatenated but are not utilized. Consider inspecting the &#8216;szCurLevel + &quot;.&quot;&#8217; expression. sci_displaytree.cpp 80<\/p>\n<h2>\u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u0435\u0437\u0435\u043d\u0438\u044e<\/h2>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/9b6\/63d\/cf7\/9b663dcf7b139d37c9e275698cab195d.png\" alt=\"\u0412\u0435\u0437\u0435\u043d\u0438\u0435\"\/>  <\/p>\n<pre><code class=\"cpp\">static int sci_toprint_two_rhs(void* _pvCtx,                                const char *fname) {   ....   sprintf(lines, &quot;%s%s\\n&quot;, lines, pStVarOne[i]);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V541 It is dangerous to print the string &#8216;lines&#8217; into itself. sci_toprint.cpp 314<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f sprintf() \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0431\u0443\u0444\u0435\u0440 &#8216;lines&#8217;. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u044d\u0442\u043e\u0442 \u0436\u0435 \u0431\u0443\u0444\u0435\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a. \u0422\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e. \u041a\u043e\u0434 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041d\u043e \u044d\u0442\u043e \u043e\u043f\u0430\u0441\u043d\u043e. \u041f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u0438 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f: sci_coserror.c 94<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0445\u043e\u0442\u044f \u0438 \u043d\u0435 \u0432\u0435\u0440\u0435\u043d:  <\/p>\n<pre><code class=\"cpp\">typedef struct JavaVMOption {     char *optionString;     void *extraInfo; } JavaVMOption;  JavaVMOption *options;  BOOL startJVM(char *SCI_PATH) {   ....   fprintf(stderr, &quot;%d: %s\\n&quot;, j, vm_args.options[j]);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V510 The &#8216;fprintf&#8217; function is not expected to receive class-type variable as fourth actual argument. jvm.c 247<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0445\u043e\u0442\u0435\u043b\u0438 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c &#8216;optionString&#8217;. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"cpp\">fprintf(stderr, &quot;%d: %s\\n&quot;, j, vm_args.options[j].optionString);<\/code><\/pre>\n<p>  \u041d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f fprintf() \u043f\u0440\u0438\u043c\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 JavaVMOption. \u041a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0443\u0434\u0435\u0441\u043d\u043e\u043c\u0443 \u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044e \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432.<\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0447\u043b\u0435\u043d &#8216;optionString&#8217; \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f fprintf() \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0435\u0433\u043e \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443.<\/p>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u044b\u0432\u0430\u0435\u0442. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u043d \u043c\u0443\u0441\u043e\u0440 (\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;extraInfo&#8217;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0442\u043e\u0436\u0435 \u043f\u043e\u043f\u0430\u0434\u0451\u0442 \u0432 \u0441\u0442\u0435\u043a).<\/p>\n<p>  \u0410\u043b\u043b\u0438\u043b\u0443\u0439\u044f!<\/p>\n<h2>\u041d\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0446\u0438\u043a\u043b<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static void reinitdoit(double *told) {   int keve = 0, kiwa = 0;   ....   kiwa = 0;   ....   for (i = 0; i &lt; kiwa; i++)   .... }<\/code><\/pre>\n<p>  V621 Consider inspecting the &#8216;for&#8217; operator. It&#8217;s possible that the loop will be executed incorrectly or won&#8217;t be executed at all. scicos.c 4432<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8216;kiwa&#8217; \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e. \u0426\u0438\u043a\u043b \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u0434 \u043d\u0435\u0434\u043e\u043f\u0438\u0441\u0430\u043d. <\/p>\n<h2>\u0427\u0442\u043e \u043d\u0435 \u0432\u043e\u0448\u043b\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u044e<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u044f \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043b \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0442\u0447\u0451\u0442 \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f. \u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043f\u0440\u043e \u0435\u0449\u0451 \u043f\u0430\u0440\u0443 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0441\u0442. \u041d\u043e \u044f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b \u0438\u0445 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438, \u0438 \u043b\u0435\u043d\u044c \u043f\u043e\u0431\u0435\u0434\u0438\u043b\u0430. \u041f\u043b\u044e\u0441 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u044f \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 <a href=\"http:\/\/www.viva64.com\/ru\/pvs-studio\/\">PVS-Studio<\/a> \u0438\u043b\u0438 <a href=\"http:\/\/www.cppcat.com\">CppCat<\/a>. \u041f\u0440\u043e\u0431\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f CppCat \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0434\u0435\u043b\u044e, \u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435.<\/b> \u0422\u0435\u043c, \u043a\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CppCat \u0438 \u043d\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c, \u0445\u043e\u0447\u0443 \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u0412\u0441\u044f \u0441\u0443\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\u0445, \u0430 \u043d\u0435 \u0432 \u0440\u0430\u0437\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0445. \u0412\u044b \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0440\u0430\u0437\u0443 \u0435\u0451 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442. \u0421\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0432 bug-\u0442\u0440\u0435\u043a\u0435\u0440\u0435. \u0421\u043c. \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0430\u0442\u044c\u044e: &quot;<a href=\"http:\/\/www.viva64.com\/ru\/b\/0105\/\">\u041b\u0435\u0432 \u0422\u043e\u043b\u0441\u0442\u043e\u0439 \u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u0434\u0430<\/a>&quot;.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/h2>\n<p>  \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0442\u043e-\u0442\u043e \u0441\u043f\u0440\u043e\u0441\u0438\u0442, \u043a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Scilab \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0430\u0441\u044c. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u0441\u0432\u0435\u0436\u0430\u044f. \u0413\u0434\u0435-\u0442\u043e \u043f\u043e\u043b\u0442\u043e\u0440\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432\u044b\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430. \u0418\u2026 \u0418 \u0437\u0430\u0431\u044b\u043b \u043f\u0440\u043e \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b. \u0411\u044b\u043b\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441\u043e <a href=\"http:\/\/www.viva64.com\/ru\/b\/0241\/\">\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432<\/a>. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043d\u0430\u0431\u0440\u0451\u043b \u043d\u0430 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b, \u0438 \u0434\u043e\u043b\u0433\u043e \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u043b, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u044b\u043b\u043e. \u042f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0443\u0436\u0435 \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043b\u043e\u0441\u044c, \u0438 \u044f \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u043c\u043d\u044e, \u0441\u043c\u043e\u0442\u0440\u0435\u043b \u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043d\u0430\u043f\u0438\u0448\u0443 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e. \u0415\u0451 \u0443\u0432\u0438\u0434\u044f\u0442 \u0430\u0432\u0442\u043e\u0440\u044b Scilab \u0438 \u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442 \u043f\u0440\u043e\u0435\u043a\u0442. \u0426\u0435\u043b\u044c \u043c\u043e\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u0430 \u043d\u0435 \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043d\u0430 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u0435. \u0412\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0433\u043b\u0443\u043f\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435.<\/p>\n<p>  \u041c\u044b \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0440\u0430\u0437\u0434\u0430\u0451\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 CppCat. \u041f\u043e\u043a\u0443\u043f\u043a\u0430 \u2014 $250, \u043f\u0440\u043e\u0434\u043b\u0435\u043d\u0438\u0435 \u2014 $200, \u0441\u043a\u0438\u0434\u043a\u0438. \u0414\u043b\u044f \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0438\u0445 \u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0433\u0434\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043d\u043e\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 MSBuild, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 Visual Studio 2005\/2008 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u043c\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 PVS-Studio. <\/p>\n<h2>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<ol>\n<li>\u0422\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u044f. <a href=\"http:\/\/www.viva64.com\/ru\/t\/0046\/\">\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u0434\u0430<\/a>.<\/li>\n<li>\u0410\u043d\u0434\u0440\u0435\u0439 \u041a\u0430\u0440\u043f\u043e\u0432. <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>.<\/li>\n<li>\u0410\u043d\u0434\u0440\u0435\u0439 \u041a\u0430\u0440\u043f\u043e\u0432, \u0415\u0432\u0433\u0435\u043d\u0438\u0439 \u0420\u044b\u0436\u043a\u043e\u0432, \u041f\u0430\u0432\u0435\u043b \u0415\u0440\u0435\u043c\u0435\u0435\u0432, \u0421\u0432\u044f\u0442\u043e\u0441\u043b\u0430\u0432 \u0420\u0430\u0437\u043c\u044b\u0441\u043b\u043e\u0432. <a href=\"http:\/\/www.viva64.com\/ru\/b\/0241\/\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430: CppCat, Cppcheck, PVS-Studio, Visual Studio<\/a>. (<a href=\"http:\/\/www.viva64.com\/ru\/a\/0086\/\">\u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/a>).<\/li>\n<\/ol>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441?<\/b><\/p>\n<div class=\"spoiler_text\">\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>. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c.  <\/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\/217557\/\"> http:\/\/habrahabr.ru\/company\/pvs-studio\/blog\/217557\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/572\/76a\/8bc\/57276a8bc032676a65a7e748ebd7b53c.png\" alt=\"PVS-Studio. You shall not pass!\" align=\"left\"\/><br \/>  \u042f \u0432\u0440\u0435\u043c\u0435\u043d\u0430\u043c\u0438 \u0431\u044b\u0432\u0430\u044e \u043e\u0437\u0430\u0434\u0430\u0447\u0435\u043d, \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0436\u0438\u0432\u0443\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0433\u043e\u0434\u0430\u043c\u0438. \u0421\u043c\u043e\u0442\u0440\u0438\u0448\u044c \u043d\u0430 \u0441\u043e\u0442\u043d\u044e \u043b\u044f\u043f\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435 \u0438 \u0443\u0434\u0438\u0432\u043b\u044f\u0435\u0448\u044c\u0441\u044f, \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0418 \u0432\u0435\u0434\u044c \u043a\u0430\u043a-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0415\u0439 \u0434\u0430\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u041f\u0440\u0438\u0447\u0435\u043c, \u044f \u0433\u043e\u0432\u043e\u0440\u044e \u043d\u0435 \u043e \u043a\u043e\u0434\u0435, \u0440\u0438\u0441\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u043a\u0435\u043c\u043e\u043d\u0430 \u0432 \u0438\u0433\u0440\u0435. \u0410, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445. \u0414\u0430, \u0432\u044b \u0432\u0435\u0440\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043a\u043e\u0434\u0430 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Scilab.  <\/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-217557","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217557","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=217557"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/217557\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217557"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}