{"id":290820,"date":"2018-10-15T18:00:03","date_gmt":"2018-10-15T14:00:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=290820"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=290820","title":{"rendered":"\u0422\u0440\u0435\u0442\u044c\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 Qt 5 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/dd9\/87d\/907\/dd987d90784865f850555bc198a97b81.png\" alt=\"PVS-Studio &amp; Qt\"><\/div>\n<p>  \u0412\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u0438. \u041e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u043c \u0442\u0430\u043a\u0438\u043c \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0441\u0442\u0430\u043b Qt. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio \u0432 2014 \u0433\u043e\u0434\u0443. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 2014 \u0433\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u0447\u0430\u043b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Coverity. \u042d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043b\u0438 \u043d\u0430\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0439\u0442\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h2>Qt<\/h2>\n<p>  \u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438:<\/p>\n<ul>\n<li>&#171;<a href=\"https:\/\/www.viva64.com\/ru\/a\/0075\/\">\u041a\u0430\u043a \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430<\/a>&#171;, \u0438\u044e\u043b\u044c 2011.<\/li>\n<li>&#171;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0251\/\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Qt 5<\/a>&#171;, \u0430\u043f\u0440\u0435\u043b\u044c 2014.<\/li>\n<\/ul>\n<p>  \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0431\u044b\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d <a href=\"https:\/\/code.qt.io\/cgit\/qt\/qtbase.git\">Qt Base<\/a> (Core, Gui, Widgets, Network, &#8230;) \u0438 <a href=\"https:\/\/code.qt.io\/cgit\/qt\/qt5.git\">Qt5 super module<\/a>. \u041f\u0440\u043e Qt Creator \u043c\u044b \u043f\u043e\u0437\u0436\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio, \u043f\u0440\u043e\u0431\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio-download\/\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/a> \u0441 \u0441\u0430\u0439\u0442\u0430. <\/p>\n<p>  \u041d\u0430 \u043c\u043e\u0439 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043a\u043e\u0434 Qt \u0441\u0442\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c. \u0417\u0430 \u0433\u043e\u0434\u044b \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 PVS-Studio \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u044b\u0445 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e, \u0432 \u0445\u043e\u0434\u0435 \u043e\u0431\u0437\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u044f \u0432\u044b\u044f\u0432\u0438\u043b \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u043c\u043d\u043e\u0433\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u0415\u0449\u0451 \u0440\u0430\u0437 \u043f\u043e\u0432\u0442\u043e\u0440\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0451 \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435. \u041a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439 \u043d\u0430 \u0442\u0435\u043c\u0443 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0438 \u0442\u043e\u0433\u0434\u0430, \u043d\u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u044f \u043d\u0435 \u0434\u0435\u043b\u0430\u043b.<\/p>\n<p>  \u041f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u0434\u0430, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 Coverity. \u0421 2014 \u0433\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Coverity \u043d\u0430\u0447\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0435\u043a\u0442 Qt (<a href=\"https:\/\/scan.coverity.com\/projects\/qt-project\">qt-project<\/a>), \u0430 \u0441 2016 \u2014 Qt Creator (<a href=\"https:\/\/scan.coverity.com\/projects\/qt-creator\">qt-creator<\/a>). \u041c\u043e\u0451 \u043c\u043d\u0435\u043d\u0438\u0435: \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0442\u043e <a href=\"https:\/\/scan.coverity.com\/\">Coverity Scan<\/a> \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043a\u0430\u043a \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0431\u044b \u044f \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b \u0432 \u043e\u0442\u0447\u0451\u0442\u0435 PVS-Studio, \u0442\u043e \u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e :). \u0410 \u0440\u0430\u0437 \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u0438 \u0434\u0435\u0444\u0435\u043a\u0442\u044b. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0438\u0445. \u0412\u0441\u0435\u0433\u043e \u044f \u0432\u044b\u043f\u0438\u0441\u0430\u043b 96 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<h2>\u041d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0439 Copy-Paste \u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438<\/h2>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0438 \u0436\u0430\u043d\u0440\u0430, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u042d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0434\u043e\u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c\u0438. \u0422\u0435\u043c, \u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0447\u0438\u0442\u0430\u043b, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0432\u0435 \u044d\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.viva64.com\/ru\/b\/0260\/\">\u042d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/a><\/li>\n<li><a href=\"https:\/\/www.viva64.com\/ru\/b\/0509\/\">\u0417\u043b\u043e \u0436\u0438\u0432\u0451\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/a><\/li>\n<\/ul>\n<p>  \u042d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u0435\u0436\u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u044f\u0437\u044b\u043a\u0430\u0445 C, C++ \u0438 C#. \u0421\u0435\u0439\u0447\u0430\u0441, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044f \u0432 PVS-Studio \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u044f\u0437\u044b\u043a\u0430 Java, \u043c\u044b \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c \u0432\u0441\u0451 \u0442\u0435 \u0436\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u044b \u043e\u0448\u0438\u0431\u043e\u043a. \u0412\u043e\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0448\u0438\u0431\u043a\u0430, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u043c\u0438 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"http:\/\/hibernate.org\/\">Hibernate<\/a>:  <\/p>\n<pre><code class=\"cpp\">public boolean equals(Object other) {   if (other instanceof Id) {     Id that = (Id) other;     return purchaseSequence.equals(this.purchaseSequence) &amp;&amp;            that.purchaseNumber == this.purchaseNumber;   }   else {     return false;   } }<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f, \u0442\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u043b\u0435 <i>purchaseSequence<\/i> \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e \u0441 \u0441\u043e\u0431\u043e\u0439. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:  <\/p>\n<pre><code class=\"cpp\">return that.purchaseSequence.equals(this.purchaseSequence) &amp;&amp;        that.purchaseNumber == this.purchaseNumber;<\/code><\/pre>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u0432\u0441\u0451 \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443 PVS-Studio \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u00ab\u0440\u0430\u0437\u0433\u0440\u0435\u0431\u0430\u0442\u044c \u0430\u0432\u0433\u0438\u0435\u0432\u044b \u043a\u043e\u043d\u044e\u0448\u043d\u0438\u00bb \u0432 Java-\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 Beta-\u0432\u0435\u0440\u0441\u0438\u0438 PVS-Studio for Java, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/www.viva64.com\/ru\/about-feedback\/\">\u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u0430\u043c<\/a> (\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 \u00ab\u0425\u043e\u0447\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u043b\u044f Java\u00bb).<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Qt.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N1<\/b>  <\/p>\n<pre><code class=\"cpp\">static inline int windowDpiAwareness(HWND hwnd) {   return QWindowsContext::user32dll.getWindowDpiAwarenessContext &amp;&amp;          QWindowsContext::user32dll.getWindowDpiAwarenessContext     ? QWindowsContext::user32dll.getAwarenessFromDpiAwarenessContext(         QWindowsContext::user32dll.getWindowDpiAwarenessContext(hwnd))     : -1; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V501 CWE-571 There are identical sub-expressions &#8216;QWindowsContext::user32dll.getWindowDpiAwarenessContext&#8217; to the left and to the right of the &#8216;&amp;&amp;&#8217; operator. qwindowscontext.cpp 150<\/p>\n<p>  \u041a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u0438\u043c\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"cpp\">return QWindowsContext::user32dll.getAwarenessFromDpiAwarenessContext &amp;&amp;        QWindowsContext::user32dll.getWindowDpiAwarenessContext   ? QWindowsContext::user32dll.getAwarenessFromDpiAwarenessContext(       QWindowsContext::user32dll.getWindowDpiAwarenessContext(hwnd))   : -1;<\/code><\/pre>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N2, N3<\/b>  <\/p>\n<pre><code class=\"cpp\">void QReadWriteLockPrivate::release() {   Q_ASSERT(!recursive);   Q_ASSERT(!waitingReaders &amp;&amp; !waitingReaders &amp;&amp;            !readerCount &amp;&amp; !writerCount);   freelist-&gt;release(id); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V501 CWE-571 There are identical sub-expressions to the left and to the right of the &#8216;&amp;&amp;&#8217; operator: !waitingReaders &amp;&amp;!waitingReaders qreadwritelock.cpp 632<\/p>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u0430 <i>Q_ASSERT<\/i>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430. \u041d\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430. \u0414\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>waitingReaders<\/i>. \u0410 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0432\u0438\u0434\u0438\u043c\u043e, \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c.<\/p>\n<p>  \u0418\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0431\u044f \u0432 625 \u0441\u0442\u0440\u043e\u043a\u0435 \u0444\u0430\u0439\u043b\u0430 qreadwritelock.cpp. \u0414\u0430 \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0435\u0442 Copy-Paste! \ud83d\ude42<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N4<\/b>  <\/p>\n<pre><code class=\"cpp\">QString QGraphicsSceneBspTree::debug(int index) const {   ....   if (node-&gt;type == Node::Horizontal) {     tmp += debug(firstChildIndex(index));     tmp += debug(firstChildIndex(index) + 1);   } else {     tmp += debug(firstChildIndex(index));     tmp += debug(firstChildIndex(index) + 1);   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V523 CWE-691 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. qgraphicsscene_bsp.cpp 179<\/p>\n<p>  \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0431\u043b\u043e\u043a \u0442\u0435\u043a\u0441\u0442\u0430 \u0431\u044b\u043b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d, \u043d\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u0430\u0431\u044b\u043b\u0438.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N5<\/b>  <\/p>\n<pre><code class=\"cpp\">enum FillRule {   OddEvenFill,   WindingFill };  QDataStream &amp;operator&gt;&gt;(QDataStream &amp;s, QPainterPath &amp;p) {   ....   int fillRule;   s &gt;&gt; fillRule;   Q_ASSERT(fillRule == Qt::OddEvenFill || Qt::WindingFill);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V768 CWE-571 The enumeration constant &#8216;WindingFill&#8217; is used as a variable of a Boolean-type. qpainterpath.cpp 2479<\/p>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u044d\u0442\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u043b\u044f\u043f! <i>Q_ASSERT<\/i> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e. \u0418\u0441\u0442\u0438\u043d\u043d\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <i>Qt::WindingFill<\/i> \u0440\u0430\u0432\u043d\u0430 1.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N6<\/b>  <\/p>\n<pre><code class=\"cpp\">bool QVariant::canConvert(int targetTypeId) const {   ....   if (currentType == QMetaType::SChar || currentType == QMetaType::Char)     currentType = QMetaType::UInt;   if (targetTypeId == QMetaType::SChar || currentType == QMetaType::Char)     targetTypeId = QMetaType::UInt;   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. \u0414\u043e\u0431\u0430\u0432\u0438\u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u044f \u043f\u043e\u043c\u043e\u0433\u0443 \u0432\u0430\u043c \u043d\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0441\u0440\u0430\u0437\u0443 :).<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/86f\/f1d\/7c5\/86ff1d7c55cdc0fb71cbce45f2f84f05.png\" alt=\"\u0412\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c\"><\/div>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V560 CWE-570 A part of conditional expression is always false: currentType == QMetaType::Char. qvariant.cpp 3529<\/p>\n<p>  \u0423\u0441\u043b\u043e\u0432\u0438\u0435 \u00abcurrentType == QMetaType::Char\u00bb \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u043e\u043c <i>if<\/i>. \u0415\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>currentType <\/i> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>QMetaType::UInt<\/i>. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>currentType <\/i> \u0443\u0436\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u0430 <i>QMetaType::Char<\/i>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c <i>if <\/i> \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u00abcurrentType == QMetaType::Char\u00bb \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u043e\u0436\u043d\u043e.<\/p>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432\u0442\u043e\u0440\u043e\u0439 <i>if <\/i> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"cpp\">if (targetTypeId == QMetaType::SChar || targetTypeId == QMetaType::Char)   targetTypeId = QMetaType::UInt;<\/code><\/pre>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043f\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 V560<\/b><\/p>\n<p>  \u0412 \u043e\u0442\u0447\u0451\u0442\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 V560. \u041e\u0434\u043d\u0430\u043a\u043e \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u0438\u0445 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0448\u0451\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0432\u044b\u0448\u0435 \u043a\u0430\u043a \u0434\u0435\u0444\u0435\u043a\u0442 N6.<\/p>\n<p>  \u041f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 V560 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043b\u043e\u0436\u043d\u044b\u043c\u0438, \u043d\u043e \u0438 \u043f\u0440\u043e\u043a\u0443 \u043e\u0442 \u043d\u0438\u0445 \u043d\u0435\u0442. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u044f \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0434\u0438\u043d \u0442\u0430\u043a\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439.  <\/p>\n<pre><code class=\"cpp\">QString QTextHtmlExporter::findUrlForImage(const QTextDocument *doc, ....) {   QString url;   if (!doc)     return url;    if (QTextDocument *parent = qobject_cast&lt;QTextDocument *&gt;(doc-&gt;parent()))       return findUrlForImage(parent, cacheKey, isPixmap);     if (doc &amp;&amp; doc-&gt;docHandle()) {       \/\/ &lt;=   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Stuidio: V560 CWE-571 A part of conditional expression is always true: doc. qtextdocument.cpp 2992<\/p>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u0440\u0430\u0432, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>doc <\/i> \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u0440\u0430\u0432\u0435\u043d <i>nullptr<\/i>. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0448\u0438\u0431\u043a\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043b\u0441\u044f. \u041c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434, \u043d\u0430\u043f\u0438\u0441\u0430\u0432:  <\/p>\n<pre><code class=\"cpp\">if (doc-&gt;docHandle()) {<\/code><\/pre>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N7<\/b><\/p>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443. \u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0438\u0437-\u0437\u0430 \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u044b \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0431\u0443\u043a\u0432\u044b.  <\/p>\n<pre><code class=\"cpp\">class QWindowsCursor : public QPlatformCursor { public:   enum CursorState {     CursorShowing,     CursorHidden,     CursorSuppressed   };   .... }  QWindowsCursor::CursorState QWindowsCursor::cursorState() {   enum { cursorShowing = 0x1, cursorSuppressed = 0x2 };   CURSORINFO cursorInfo;   cursorInfo.cbSize = sizeof(CURSORINFO);   if (GetCursorInfo(&amp;cursorInfo)) {     if (cursorInfo.flags &amp; CursorShowing)   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V616 CWE-480 The &#8216;CursorShowing&#8217; named constant with the value of 0 is used in the bitwise operation. qwindowscursor.cpp 669<\/p>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u044f \u0443\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b \u044d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u0437\u0430\u043c\u0435\u0442\u043a\u0435: &#171;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0582\/\">\u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430<\/a>&#171;.<\/p>\n<h2>\u0414\u0435\u0444\u0435\u043a\u0442\u044b \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0434\u0435\u0444\u0435\u043a\u0442\u0430\u043c\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0412\u0441\u0435 \u043e\u043d\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"https:\/\/cwe.mitre.org\/\">Common Weakness Enumeration<\/a> (\u0441\u043c. CWE ID \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430). \u0415\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a CWE, \u0442\u043e \u043e\u043d\u0438 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0443\u0433\u0440\u043e\u0437\u0443 \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 <a href=\"https:\/\/www.viva64.com\/ru\/sast\/\">PVS-Studio SAST<\/a>.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0440\u044f\u0434 \u043e\u0448\u0438\u0431\u043e\u043a \u0442\u0430\u043a \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043d\u0438\u0445.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N8, N9<\/b>  <\/p>\n<pre><code class=\"cpp\">bool QLocalServerPrivate::addListener() {   ....   SetSecurityDescriptorOwner(pSD.data(), pTokenUser-&gt;User.Sid, FALSE);   SetSecurityDescriptorGroup(pSD.data(), pTokenGroup-&gt;PrimaryGroup, FALSE);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f PVS-Studio:<\/p>\n<ul>\n<li>V530 CWE-252 The return value of function &#8216;SetSecurityDescriptorOwner&#8217; is required to be utilized. qlocalserver_win.cpp 167<\/li>\n<li>V530 CWE-252 The return value of function &#8216;SetSecurityDescriptorGroup&#8217; is required to be utilized. qlocalserver_win.cpp 168<\/li>\n<\/ul>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0424\u0443\u043d\u043a\u0446\u0438\u0438 <i>SetSecurityDescriptorOwner<\/i> \u0438 <i>SetSecurityDescriptorGroup <\/i> \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0438\u0445 \u0447\u0438\u0441\u043b\u0443.<\/p>\n<p>  \u0421 \u0442\u0430\u043a\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043d\u0430\u0434\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442. \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u0435\u0439? \u0413\u0430\u0434\u0430\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e, \u043d\u0430\u0434\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f.<\/p>\n<p>  \u041d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0440\u0438\u0441\u043a\u0430, \u0438 \u043d\u0430\u0434\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N10<\/b>  <\/p>\n<pre><code class=\"cpp\">bool QLocalServerPrivate::addListener() {   ....   InitializeAcl(acl, aclSize, ACL_REVISION_DS);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V530 CWE-252 The return value of function &#8216;InitializeAcl&#8217; is required to be utilized. qlocalserver_win.cpp 144<\/p>\n<p>  \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0439 \u0432\u044b\u0448\u0435.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N11, N12<\/b>  <\/p>\n<pre><code class=\"cpp\">static inline void sha1ProcessChunk(....) {   ....   quint8 chunkBuffer[64];   .... #ifdef SHA1_WIPE_VARIABLES   ....   memset(chunkBuffer, 0, 64); #endif }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V597 CWE-14 The compiler could delete the &#8216;memset&#8217; function call, which is used to flush &#8216;chunkBuffer&#8217; buffer. The RtlSecureZeroMemory() function should be used to erase the private data. sha1.cpp 189<\/p>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>memset<\/i>. \u0423\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437 \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u044f \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u041e\u0442\u0441\u044b\u043b\u0430\u044e \u043a \u0441\u0442\u0430\u0442\u044c\u0435 &#171;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0388\/\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/a>&#171;.<\/p>\n<p>  \u0418 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u0444\u0430\u0439\u043b\u0435 sha1.cpp, \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 247. <\/p>\n<h2>\u041d\u0443\u043b\u0435\u0432\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/h2>\n<p>  \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u0431 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u0445. \u041d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u043c\u043d\u043e\u0433\u043e \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N13<\/b>  <\/p>\n<pre><code class=\"cpp\">QByteArray &amp;QByteArray::append(const char *str, int len) {   if (len &lt; 0)     len = qstrlen(str);   if (str &amp;&amp; len) {     .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V595 CWE-476 The &#8216;str&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2118, 2119. qbytearray.cpp 2118<\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0430 \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 <i>nullptr<\/i>. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043e\u0448\u0438\u0431\u043a\u0438, \u0438 \u043c\u044b <a href=\"https:\/\/www.viva64.com\/ru\/examples\/v595\/\">\u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u043c<\/a> \u0435\u0433\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N14, N15<\/b>  <\/p>\n<pre><code class=\"cpp\">static inline const QMetaObjectPrivate *priv(const uint* data) { return reinterpret_cast&lt;const QMetaObjectPrivate*&gt;(data); }  bool QMetaEnum::isFlag() const {   const int offset = priv(mobj-&gt;d.data)-&gt;revision &gt;= 8 ? 2 : 1;   return mobj &amp;&amp; mobj-&gt;d.data[handle + offset] &amp; EnumIsFlag; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V595 CWE-476 The &#8216;mobj&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2671, 2672. qmetaobject.cpp 2671<\/p>\n<p>  \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u044f \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0442\u0435\u043b\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>priv<\/i>. \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u044d\u0442\u043e \u043d\u0435\u0434\u043e\u0432\u0435\u0440\u0438\u0435 \u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u043e\u0448\u0438\u0431\u043a\u0435 \u0445\u0438\u0442\u0440\u0443\u044e \u0444\u0438\u0447\u0443 :). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e <i>priv<\/i> \u2014 \u044d\u0442\u043e \u043c\u0430\u043a\u0440\u043e\u0441 \u0432\u0438\u0434\u0430:  <\/p>\n<pre><code class=\"cpp\">#define priv(A) foo(sizeof(A))<\/code><\/pre>\n<p>  \u0422\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u044f\u043c, \u044f \u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430, \u0433\u0434\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0449\u0430\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>modj <\/i> \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430 \u0441\u0446\u0435\u043d\u0443 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u00ab\u043c\u043e\u0433\u0443\u0447\u0438\u0439 \u0438 \u0443\u0436\u0430\u0441\u043d\u044b\u0439\u00bb Copy-Paste. \u0418\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0442\u0430\u043a\u0430\u044f \u0436\u0435 \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>isScoped<\/i>:  <\/p>\n<pre><code class=\"cpp\">bool QMetaEnum::isScoped() const {   const int offset = priv(mobj-&gt;d.data)-&gt;revision &gt;= 8 ? 2 : 1;   return mobj &amp;&amp; mobj-&gt;d.data[handle + offset] &amp; EnumIsScoped; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V595 CWE-476 The &#8216;mobj&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2683, 2684. qmetaobject.cpp 2683<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N16-N21<\/b><\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0438, \u0434\u0443\u043c\u0430\u044e, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.  <\/p>\n<pre><code class=\"cpp\">void QTextCursor::insertFragment(const QTextDocumentFragment &amp;fragment) {   if (!d || !d-&gt;priv || fragment.isEmpty())     return;    d-&gt;priv-&gt;beginEditBlock();   d-&gt;remove();   fragment.d-&gt;insert(*this);   d-&gt;priv-&gt;endEditBlock();    if (fragment.d &amp;&amp; fragment.d-&gt;doc)     d-&gt;priv-&gt;mergeCachedResources(fragment.d-&gt;doc-&gt;docHandle()); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V595 CWE-476 The &#8216;fragment.d&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2238, 2241. qtextcursor.cpp 2238<\/p>\n<p>  \u0412\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u043c\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>fragment.d<\/i>.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430:<\/p>\n<ul>\n<li>V595 CWE-476 The &#8216;window&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1846, 1848. qapplication.cpp 1846<\/li>\n<li>V595 CWE-476 The &#8216;window&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1858, 1860. qapplication.cpp 1858<\/li>\n<li>V595 CWE-476 The &#8216;reply&#8217; pointer was utilized before it was verified against nullptr. Check lines: 492, 502. qhttpnetworkconnectionchannel.cpp 492<\/li>\n<li>V595 CWE-476 The &#8216;newHandle&#8217; pointer was utilized before it was verified against nullptr. Check lines: 877, 883. qsplitter.cpp 877<\/li>\n<li>V595 CWE-476 The &#8216;widget&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2320, 2322. qwindowsvistastyle.cpp 2320<\/li>\n<li>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0431\u043e\u043b\u044c\u0448\u0435. \u041c\u043d\u0435 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0434\u043e\u0435\u043b\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f V595, \u0430 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u0443\u0436\u0435 \u0432\u044b\u043f\u0438\u0441\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u0430.<\/li>\n<\/ul>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N22-N33<\/b><\/p>\n<p>  \u0415\u0441\u0442\u044c \u043a\u043e\u0434, \u0433\u0434\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>new<\/i>. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0437\u0430\u0431\u0430\u0432\u043d\u043e \u043d\u0430 \u0444\u043e\u043d\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0430\u0441\u0441\u0430 \u043c\u0435\u0441\u0442, \u0433\u0434\u0435 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>malloc<\/i> (\u0441\u043c. \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0448\u0438\u0431\u043e\u043a).  <\/p>\n<pre><code class=\"cpp\">bool QTranslatorPrivate::do_load(const QString &amp;realname,                                  const QString &amp;directory) {   ....   d-&gt;unmapPointer = new char[d-&gt;unmapLength];   if (d-&gt;unmapPointer) {     file.seek(0);     qint64 readResult = file.read(d-&gt;unmapPointer, d-&gt;unmapLength);     if (readResult == qint64(unmapLength))       ok = true;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V668 CWE-571 There is no sense in testing the &#8216;d-&gt;unmapPointer&#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. qtranslator.cpp 596<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <i>std::bad_alloc<\/i>. \u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>new <\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b <i>nullptr<\/i>, \u0442\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c:  <\/p>\n<pre><code class=\"cpp\">d-&gt;unmapPointer = new (std::nothrow) char[d-&gt;unmapLength];<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u043d\u0430\u0435\u0442 \u043f\u0440\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>new<\/i> \u0438 \u043d\u0435 \u0432\u044b\u0434\u0430\u043b \u0431\u044b \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435. <\/p>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438: \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u043c <a href=\"http:\/\/cppfiles.com\/qt5_3\/qt-V668.txt\">qt-V668.txt<\/a>.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N34-N70<\/b><\/p>\n<p>  \u041a\u0430\u043a \u0438 \u043e\u0431\u0435\u0449\u0430\u043b, \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <i>malloc<\/i>, <i>calloc<\/i>, <i>strdup<\/i> \u0438 \u0442.\u0434. \u042d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0435\u0435, \u0447\u0435\u043c \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: &#171;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0558\/\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f malloc<\/a>&#171;.  <\/p>\n<pre><code class=\"cpp\">SourceFiles::SourceFiles() {   nodes = (SourceFileNode**)malloc(sizeof(SourceFileNode*)*(num_nodes=3037));   for(int n = 0; n &lt; num_nodes; n++)     nodes[n] = nullptr; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V522 CWE-690 There might be dereferencing of a potential null pointer &#8216;nodes&#8217;. Check lines: 138, 136. makefiledeps.cpp 138<\/p>\n<p>  \u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043d\u0430 \u043d\u0438\u0445 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u043e\u043c: <a href=\"http:\/\/cppfiles.com\/qt5_3\/qt-V522-V575.txt\">qt-V522-V575.txt<\/a>.<\/p>\n<h2>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445<\/h2>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N71<\/b>  <\/p>\n<pre><code class=\"cpp\">QString QEdidParser::parseEdidString(const quint8 *data) {   QByteArray buffer(reinterpret_cast&lt;const char *&gt;(data), 13);    \/\/ Erase carriage return and line feed   buffer = buffer.replace('\\r', '\\0').replace('\\n', '\\0');    \/\/ Replace non-printable characters with dash   for (int i = 0; i &lt; buffer.count(); ++i) {     if (buffer[i] &lt; '\\040' &amp;&amp; buffer[i] &gt; '\\176')       buffer[i] = '-';   }    return QString::fromLatin1(buffer.trimmed()); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 CWE-570 Expression &#8216;buffer[i] &lt; &#8216;\\040&#8217; &amp;&amp; buffer[i] &gt; &#8216;\\176&#187; is always false. qedidparser.cpp 169<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0431\u044f\u0437\u0430\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u00abReplace non-printable characters with dash\u00bb. \u041e\u0434\u043d\u0430\u043a\u043e \u043e\u043d\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442. \u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0442 \u043d\u0430 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435:  <\/p>\n<pre><code class=\"cpp\">if (buffer[i] &lt; '\\040' &amp;&amp; buffer[i] &gt; '\\176')<\/code><\/pre>\n<p>  \u041e\u043d\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u0421\u0438\u043c\u0432\u043e\u043b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0431\u044b\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 &#8216;\\040&#8217; \u0438 \u0431\u043e\u043b\u044c\u0448\u0435 &#8216;\\176&#8217;. \u0412 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &#8216;||&#8217;. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"cpp\">if (buffer[i] &lt; '\\040' || buffer[i] &gt; '\\176')<\/code><\/pre>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N72<\/b><\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0438\u0437-\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u0451\u0442 Windows-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.  <\/p>\n<pre><code class=\"cpp\">#if defined(Q_OS_WIN) static QString driveSpec(const QString &amp;path) {   if (path.size() &lt; 2)     return QString();   char c = path.at(0).toLatin1();   if (c &lt; 'a' &amp;&amp; c &gt; 'z' &amp;&amp; c &lt; 'A' &amp;&amp; c &gt; 'Z')     return QString();   if (path.at(1).toLatin1() != ':')     return QString();   return path.mid(0, 2); } #endif<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>V590 CWE-571 Consider inspecting the &#8216;c &lt; &#8216;a&#8217; &amp;&amp; c &gt; &#8216;z&#8217; &amp;&amp; c &lt; &#8216;A&#8217; &amp;&amp; c &gt; &#8216;Z&#187; expression. The expression is excessive or contains a misprint. qdir.cpp 77<\/li>\n<li>V560 CWE-570 A part of conditional expression is always false: c &gt; &#8216;z&#8217;. qdir.cpp 77<\/li>\n<\/ul>\n<p>  \u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438:  <\/p>\n<pre><code class=\"cpp\">if (c &lt; 'a' &amp;&amp; c &gt; 'z' &amp;&amp; c &lt; 'A' &amp;&amp; c &gt; 'Z')<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u0439\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u043e\u0439 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"cpp\">if ((c &lt; 'a' || c &gt; 'z') &amp;&amp; (c &lt; 'A' || c &gt; 'Z'))<\/code><\/pre>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N73<\/b>  <\/p>\n<pre><code class=\"cpp\">enum SelectionMode {   NoSelection,   SingleSelection,   MultiSelection,   ExtendedSelection,   ContiguousSelection };  void QAccessibleTableCell::unselectCell() {   QAbstractItemView::SelectionMode selectionMode = view-&gt;selectionMode();   if (!m_index.isValid() || (selectionMode &amp; QAbstractItemView::NoSelection))     return;   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V616 CWE-480 The &#8216;QAbstractItemView::NoSelection&#8217; named constant with the value of 0 is used in the bitwise operation. itemviews.cpp 976<\/p>\n<p>  \u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <i>QAbstractItemView::NoSelection <\/i> \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <i>(selectionMode &amp; QAbstractItemView::NoSelection)<\/i> \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u0412\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c\u0441\u044f 0.<\/p>\n<p>  \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0437\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cpp\">if (!m_index.isValid() || (selectionMode == QAbstractItemView::NoSelection))<\/code><\/pre>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N74<\/b><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043c\u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0442\u0440\u0443\u0434\u043d\u043e. \u041e\u043d \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439, \u043d\u043e \u043a\u0430\u043a\u0438\u043c \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u044f \u043d\u0435 \u0437\u043d\u0430\u044e. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u043e\u0436\u0435 \u043c\u043d\u0435 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442.  <\/p>\n<pre><code class=\"cpp\">\/\/ Re-engineered from the inline function _com_error::ErrorMessage(). \/\/ We cannot use it directly since it uses swprintf_s(), which is not \/\/ present in the MSVCRT.DLL found on Windows XP (QTBUG-35617). static inline QString errorMessageFromComError(const _com_error &amp;comError) {   TCHAR *message = nullptr;   FormatMessage(     FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,     NULL, DWORD(comError.Error()), MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),     message, 0, NULL);   if (message) {     const QString result = QString::fromWCharArray(message).trimmed();     LocalFree(static_cast&lt;HLOCAL&gt;(message));     return result;   }   if (const WORD wCode = comError.WCode())     return QString::asprintf(\"IDispatch error #%u\", uint(wCode));   return QString::asprintf(\"Unknown error 0x0%x\", uint(comError.Error())); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 CWE-570 Expression &#8216;message&#8217; is always false. qwindowscontext.cpp 802<\/p>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>FormatMessage<\/i> \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <i>message<\/i>. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <i>FormatMessage<\/i> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e. \u0412\u043e\u0442 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:  <\/p>\n<pre><code class=\"cpp\">DWORD __stdcall FormatMessageW(   DWORD dwFlags,   LPCVOID lpSource,   DWORD dwMessageId,   DWORD dwLanguageId,   LPWSTR lpBuffer,   DWORD nSize,   va_list *Arguments );<\/code><\/pre>\n<h2>\u041f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N75-N92<\/b>  <\/p>\n<pre><code class=\"cpp\">struct SourceDependChildren {   SourceFile **children;   int num_nodes, used_nodes;   SourceDependChildren() : children(nullptr), num_nodes(0), used_nodes(0) { }   ~SourceDependChildren() { if (children) free(children); children = nullptr; }   void addChild(SourceFile *s) {     if(num_nodes &lt;= used_nodes) {       num_nodes += 200;       children = (SourceFile**)realloc(children,                                        sizeof(SourceFile*)*(num_nodes));     }     children[used_nodes++] = s;   } };<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V701 CWE-401 realloc() possible leak: when realloc() fails in allocating memory, original pointer &#8216;children&#8217; is lost. Consider assigning realloc() to a temporary pointer. makefiledeps.cpp 103<\/p>\n<p>  \u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0444\u0435\u0440\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043e\u043f\u0430\u0441\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>realloc <\/i> \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c, \u043e\u043d\u0430 \u0432\u0435\u0440\u043d\u0451\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>NULL<\/i>. \u042d\u0442\u043e\u0442 <i>NULL <\/i> \u0431\u0443\u0434\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043c\u0435\u0449\u0451\u043d \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>children<\/i> \u0438 \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a-\u0442\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0431\u0443\u0444\u0435\u0440, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435. \u041f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0443\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438. <\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438: <a href=\"http:\/\/cppfiles.com\/qt5_3\/qt-701.txt\">qt-701.txt<\/a>.<\/p>\n<h2>\u0420\u0430\u0437\u043d\u043e\u0435<\/h2>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N93<\/b>  <\/p>\n<pre><code class=\"cpp\">template&lt;class GradientBase, typename BlendType&gt; static inline const BlendType * QT_FASTCALL qt_fetch_linear_gradient_template(....) {   ....   if (t+inc*length &lt; qreal(INT_MAX &gt;&gt; (FIXPT_BITS + 1)) &amp;&amp;       t+inc*length &gt; qreal(INT_MIN &gt;&gt; (FIXPT_BITS + 1))) {   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V610 CWE-758 Unspecified behavior. Check the shift operator &#8216;&gt;&gt;&#8217;. The left operand &#8216;(- 2147483647 \u2014 1)&#8217; is negative. qdrawhelper.cpp 4015<\/p>\n<p>  \u041d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>INT_MIN<\/i>. \u042d\u0442\u043e \u043d\u0435\u0443\u0442\u043e\u0447\u043d\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0438 \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0430\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043b\u044c\u0437\u044f. \u0421\u0442\u0430\u0440\u0448\u0438\u0435 \u0431\u0438\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0432\u043d\u044b\u043c\u0438 0, \u0442\u0430\u043a \u0438 1.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N94<\/b>  <\/p>\n<pre><code class=\"cpp\">void QObjectPrivate::addConnection(int signal, Connection *c) {   ....   if (signal &gt;= connectionLists-&gt;count())     connectionLists-&gt;resize(signal + 1);    ConnectionList &amp;connectionList = (*connectionLists)[signal];   ....   if (signal &lt; 0) {   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V781 CWE-129 The value of the &#8216;signal&#8217; variable is checked after it was used. Perhaps there is a mistake in program logic. Check lines: 397, 413. qobject.cpp 397<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <i>(signal &lt; 0)<\/i> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <i>signal<\/i> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0440\u0430\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043e\u0437\u0434\u043d\u043e. \u0420\u0430\u0431\u043e\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0430.<\/p>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N95<\/b>  <\/p>\n<pre><code class=\"cpp\">bool QXmlStreamWriterPrivate::finishStartElement(bool contents) {   ....   if (inEmptyElement) {     write(\"\/&gt;\");     QXmlStreamWriterPrivate::Tag &amp;tag = tagStack_pop();     lastNamespaceDeclaration = tag.namespaceDeclarationsSize;     lastWasStartElement = false;   } else {     write(\"&gt;\");   }   inStartElement = inEmptyElement = false;   lastNamespaceDeclaration = namespaceDeclarations.size();   return hadSomethingWritten; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V519 CWE-563 The &#8216;lastNamespaceDeclaration&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3188, 3194. qxmlstream.cpp 3194<\/p>\n<p>  \u0412\u044b\u0434\u0435\u043b\u044e \u0441\u0443\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438:  <\/p>\n<pre><code class=\"cpp\">if (inEmptyElement) {   lastNamespaceDeclaration = tag.namespaceDeclarationsSize; } lastNamespaceDeclaration = namespaceDeclarations.size();<\/code><\/pre>\n<p>  <b>\u0414\u0435\u0444\u0435\u043a\u0442 N96<\/b>  <\/p>\n<pre><code class=\"cpp\">void QRollEffect::scroll() {   ....   if (currentHeight != totalHeight) {     currentHeight = totalHeight * (elapsed\/duration)         + (2 * totalHeight * (elapsed%duration) + duration)         \/ (2 * duration);     \/\/ equiv. to int((totalHeight*elapsed) \/ duration + 0.5)     done = (currentHeight &gt;= totalHeight);   }   done = (currentHeight &gt;= totalHeight) &amp;&amp;          (currentWidth &gt;= totalWidth);   .... }<\/code><\/pre>\n<p>  V519 CWE-563 The &#8216;done&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 509, 511. qeffects.cpp 511<\/p>\n<p>  \u0412\u0441\u0451 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>done<\/i>.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0414\u0430\u0436\u0435 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u043e\u0442\u0447\u0451\u0442, \u044f \u0432\u044b\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0447\u0442\u0438 100 \u043e\u0448\u0438\u0431\u043e\u043a. \u042f \u0434\u043e\u0432\u043e\u043b\u0435\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u044b PVS-Studio.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0440\u0435\u0434\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0434\u0430 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0441 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0438 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430. \u041e\u043d\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0438 \u0441\u043d\u0438\u0436\u0430\u044e\u0442 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u0437\u0430\u0449\u0438\u0449\u0430\u044e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u043c\u043d\u043e\u0433\u0438\u0445 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0432 \u043a\u0443\u0440\u0441\u0435 \u043d\u0430\u0448\u0438\u0445 \u043d\u043e\u0432\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043a\u0430\u043d\u0430\u043b\u043e\u0432:<\/p>\n<ol>\n<li>\u00ab\u041e\u043b\u0434\u0441\u043a\u0443\u043b\u044c\u043d\u044b\u0439\u00bb RSS: <a href=\"http:\/\/feeds.feedburner.com\/viva64-blog-ru\">viva64-blog-ru<\/a><\/li>\n<li>Twitter: <a href=\"https:\/\/twitter.com\/pvs_studio\">@pvs_studio<\/a><\/li>\n<li>Instagram: <a href=\"https:\/\/www.instagram.com\/pvsstudio_rus\/\">@pvsstudio_rus<\/a><\/li>\n<li>Telegram: <a href=\"https:\/\/t.me\/pvsstudio_rus\">@pvsstudio_rus<\/a><\/li>\n<\/ol>\n<p><a href=\"https:\/\/www.viva64.com\/en\/b\/0584\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ts\/z9\/km\/tsz9kmyjtteajhd4x1au60rsrvq.png\" align=\"left\"><\/a><\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Andrey Karpov. <a href=\"https:\/\/www.viva64.com\/en\/b\/0584\/\">A Third Check of Qt 5 with PVS-Studio<\/a><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/426485\/\"> https:\/\/habr.com\/post\/426485\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/dd9\/87d\/907\/dd987d90784865f850555bc198a97b81.png\" alt=\"PVS-Studio &amp; Qt\"><\/div>\n<p>  \u0412\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u0448\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u0438. \u041e\u0447\u0435\u0440\u0435\u0434\u043d\u044b\u043c \u0442\u0430\u043a\u0438\u043c \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0441\u0442\u0430\u043b Qt. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0438 \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio \u0432 2014 \u0433\u043e\u0434\u0443. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 2014 \u0433\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u0447\u0430\u043b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Coverity. \u042d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043b\u0438 \u043d\u0430\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0439\u0442\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio.  <\/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-290820","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290820","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=290820"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/290820\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}