{"id":417128,"date":"2024-06-30T01:21:48","date_gmt":"2024-06-30T01:21:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=417128"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=417128","title":{"rendered":"<span>\u0415\u0441\u0442\u044c \u043b\u0438 \u0431\u0430\u0433\u0438 \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u0438\u043b\u0438 \u043a\u0430\u043a PVS-Studio \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b Blend2D<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u043d\u0438\u0445 \u043f\u0440\u043e\u0449\u0435 \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438. \u0410 \u0447\u0442\u043e \u0436\u0435 PVS-Studio \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435? \u041c\u044b \u0432\u0437\u044f\u043b\u0438 Blend2D \u2013 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 2D-\u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u2013 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0441\u0432\u043e\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0448\u043b\u043e.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/2c9\/24f\/e26\/2c924fe2637af273f963fef60b1a4e12.png\" alt=\"0894_Blend2d_ru\/image1.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2c9\/24f\/e26\/2c924fe2637af273f963fef60b1a4e12.png\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041d\u0438 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0433\u0447\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u042d\u0442\u043e \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435\u043c &#171;\u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a&#187;, \u043d\u043e \u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/0158\/\">\u0440\u0430\u0441\u0442\u0451\u0442 \u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043c\u044b \u043b\u044e\u0431\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435\u043c &#171;\u0436\u0438\u0440\u043d\u044e\u0449\u0438\u0445&#187; \u0438 \u0437\u0430\u043a\u043e\u0432\u044b\u0440\u0438\u0441\u0442\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a. \u0414\u0430 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 \u043a\u0443\u0447\u0435\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, legacy \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0432\u043a\u0443\u0441\u043d\u044f\u0448\u0435\u043a.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c, \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u043e\u0442\u043e\u0439\u0442\u0438 \u043e\u0442 \u043d\u0430\u0448\u0435\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0431\u0440\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438. \u0420\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0432 \u043d\u0451\u043c \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 PVS-Studio. \u041c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Blend2D. \u042f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0432\u0435\u0442\u043a\u0443 master, \u043a\u043e\u043c\u043c\u0438\u0442 <a href=\"https:\/\/github.com\/blend2d\/blend2d\/tree\/c4847906ea9423fe365ccafcaff62a37df5de3aa\">c484790.<\/a><a name=\"habracut\"><\/a><\/p>\n<p>  <\/p>\n<h2 id=\"blend2d\">Blend2D<\/h2>\n<p>  <\/p>\n<p>Blend2D \u2014 \u044d\u0442\u043e \u0434\u0432\u0438\u0436\u043e\u043a \u0434\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 2D-\u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u042d\u0442\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043d\u0430 C++ \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u043e\u043a\u043e\u043b\u043e 70&#8217;000 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">--------------------------------------------------------------------- Language           files          blank        comment           code --------------------------------------------------------------------- C++                   97          12924           9481          43372 C\/C++ Header         137           8305          12971          25225<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 2D-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0438 \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u044b\u0439 \u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0442\u043e\u0440. Blend2D \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 C \u0438 C++ API. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u0440\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430 \u0438\u0445 <a href=\"https:\/\/blend2d.com\/\">\u0441\u0430\u0439\u0442\u0435<\/a>. \u042f \u0436\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0443 \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b PVS-Studio \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Blend2D.<\/p>\n<p>  <\/p>\n<h2 id=\"vsegda-lozhnoe-vyrazhenie\">\u0412\u0441\u0435\u0433\u0434\u0430 \u043b\u043e\u0436\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v547\/\">V547<\/a> Expression &#8216;h == 0&#8217; is always false. jpegcodec.cpp 252<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">BLResult blJpegDecoderImplProcessMarker(....) noexcept {   uint32_t h = blMemReadU16uBE(p + 1);   \/\/ ....   if (h == 0)     return blTraceError(BL_ERROR_JPEG_UNSUPPORTED_FEATURE);   \/\/ ....   impl->delayedHeight = (h == 0); \/\/ &lt;=   \/\/ .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>h<\/em> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>blMemReadU16uBE<\/em>. \u0417\u0430\u0442\u0435\u043c, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <em>h == 0<\/em> \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0439, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0417\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <em>impl->delayedHeight<\/em> \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>h<\/em> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 <em>impl->delayedHeight<\/em> \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u0441\u044f <em>false<\/em>.<\/p>\n<p>  <\/p>\n<h2 id=\"opechatka-v-signature-funkcii\">\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h2>\n<p>  <\/p>\n<p>V557 [CERT-ARR30-C] Array overrun is possible. The &#8216;3&#8217; index is pointing beyond array bound. geometry_p.h 552<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static BL_INLINE bool blIsCubicFlat(const BLPoint p[3], double f) {   if (p[3] == p[0]) {     \/\/ ....   }   \/\/ .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u0432 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>blIsCubicFlat<\/em> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>p<\/em> \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043c\u0430\u0441\u0441\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 3. \u0410 \u0437\u0430\u0442\u0435\u043c \u0432 \u0442\u0435\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>blMemReadU16uBE<\/em> \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f <em>p[3]<\/em>. <\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <em>const BLPoint p[3]<\/em> \u0432 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044e <em>const BLPoint *p<\/em>, \u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0445\u043e\u0434 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 3 \u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>blIsCubicFlat<\/em> \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 <em>p<\/em> \u043c\u0430\u0441\u0441\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 4 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435, \u0442\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0438 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e. \u042f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 <a href=\"https:\/\/github.com\/blend2d\/blend2d\/blob\/c4847906ea9423fe365ccafcaff62a37df5de3aa\/src\/blend2d\/pathstroke.cpp\">\u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>blIsCubicFlat<\/em><\/a> \u0438 \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u043c\u0430\u0441\u0441\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 4 \u0432 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f. \u0417\u043d\u0430\u0447\u0438\u0442, \u043e\u0448\u0438\u0431\u043a\u0443 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0432 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"lishnee-vychislenie-iz-za-nepravilnogo-operatora\">\u041b\u0438\u0448\u043d\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0438\u0437-\u0437\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h2>\n<p>  <\/p>\n<p>V792 The &#8216;_isTagged&#8217; function located to the right of the operator &#8216;&amp;&#8217; will be called regardless of the value of the left operand. Perhaps, it is better to use &#8216;&amp;&amp;&#8217;. style.h 209<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">BL_NODISCARD BL_INLINE bool isObject() const noexcept {   return (data.type > BL_STYLE_TYPE_SOLID) &amp; _isTagged(); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 &amp;&amp; \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0433\u043e &amp;. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0431\u0438\u0442\u043e\u0433\u043e &amp; \u043e\u0431\u0430 \u0435\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <em>(data.type > BL_STYLE_TYPE_SOLID) <\/em>\u043b\u043e\u0436\u043d\u0430\u044f, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043f\u043e\u0431\u0438\u0442\u043e\u0433\u043e &amp; \u0431\u0443\u0434\u0435\u0442 0 \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>_isTagged<\/em> \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <em>(data.type > BL_STYLE_TYPE_SOLID) <\/em>\u043b\u043e\u0436\u043d\u0430\u044f, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e &amp;&amp; \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 0, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430. \u0418 \u0437\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>_isTagged<\/em> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430. <\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u0430 \u0445\u043e\u0442\u0438\u043c \u043b\u0438 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>_isTagged<\/em> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430? \u0412\u0435\u0434\u044c \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0430 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>_isTagged<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">BL_NODISCARD BL_INLINE bool _isTagged(uint32_t styleType) const noexcept {<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043f\u043e \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, <em>_isTagged<\/em> \u0438\u043c\u0435\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <em>const<\/em>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432 \u0443 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e &amp;&amp; \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0431\u0438\u0442\u043e\u0433\u043e &amp; \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0439 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<p>  <\/p>\n<h2 id=\"lishnyaya-proverka\">\u041b\u0438\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/h2>\n<p>  <\/p>\n<p>V595 [CERT-EXP12-C] The &#8216;_threadPool&#8217; pointer was utilized before it was verified against nullptr. Check lines: 158, 164. rasterworkermanager.cpp 158<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">class BLRasterWorkerManager { public:   BLThreadPool* _threadPool;   uint32_t _workerCount;   \/\/ .... } \/\/ .... void BLRasterWorkerManager::reset() noexcept {   \/\/ ....   if (_workerCount) {     \/\/ ....     _threadPool->releaseThreads(_workerThreads, _workerCount);     _workerCount = 0;     \/\/ ....   }   if (_threadPool) {     _threadPool->release();     _threadPool = nullptr;   }   \/\/ .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>_threadPool<\/em> \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0438\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <em>nullptr<\/em>. \u0412\u043e\u043f\u0440\u043e\u0441: \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043a\u043e\u0434, \u044f \u043f\u0440\u0438\u0448\u0451\u043b \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 <em>BLRasterWorkerManager<\/em> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442: \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>_threadPool<\/em> \u043d\u0443\u043b\u0435\u0432\u043e\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435 <em>_workerCount<\/em> \u0440\u0430\u0432\u043d\u043e 0. <\/p>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <em>reset<\/em>, \u043f\u043e\u043b\u044f <em>workerCount<\/em> \u0438 <em>_threadPool<\/em> \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0434\u0432\u0443\u0445 \u043c\u0435\u0441\u0442\u0430\u0445: \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0438 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <em>init<\/em>. \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">BL_INLINE BLRasterWorkerManager() noexcept     : \/\/ ....       _threadPool(nullptr),       \/\/ ....       _workerCount(0),       \/\/ ....       {}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u043f\u043e\u043b\u044e <em>_workerCount<\/em> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0, \u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044e <em>_threadPool<\/em> \u2013 <em>nullptr<\/em>. \u0418\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <em>init<\/em> \u0432\u0441\u0451 \u0441\u043b\u043e\u0436\u043d\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">BLResult BLRasterWorkerManager::init(....) noexcept {   \/\/ ....   uint32_t workerCount = threadCount - 1;   \/\/ ....   if (workerCount) {     \/\/ ....     BLThreadPool* threadPool = nullptr;     if (initFlags &amp; BL_CONTEXT_CREATE_FLAG_ISOLATED_THREAD_POOL) {       threadPool = blThreadPoolCreate();       if (!threadPool)         return blTraceError(BL_ERROR_OUT_OF_MEMORY);     }     else {       threadPool = blThreadPoolGlobal();     }     \/\/ ....     uint32_t n = threadPool->acquireThreads(workerThreads,  workerCount, acquireThreadFlags, &amp;reason);     \/\/ ....     if (!n) {       threadPool->release();       threadPool = nullptr;       \/\/ ....     }     \/\/ ....     _threadPool = threadPool;     \/\/ ....     _workerCount = n;   }   else {   \/\/ ....   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>workerCount<\/em> (\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043b\u0435\u043c <em>_workerCount<\/em>!). \u0414\u0430\u043b\u0435\u0435 \u0435\u0441\u043b\u0438 \u0435\u0451 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f else-\u0432\u0435\u0442\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043d\u0430\u0441 \u043f\u043e\u043b\u044f \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 <em>workerCount<\/em> \u043d\u0435 \u0440\u0430\u0432\u043d\u0430 0 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f then-\u0432\u0435\u0442\u043a\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>threadPool<\/em> (\u043d\u0435 \u043f\u0443\u0442\u0430\u0442\u044c \u0441 <em>_threadPool<\/em>!) \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043d\u0443\u043b\u0438\u0442\u0441\u044f. \u041f\u043e\u0442\u043e\u043c, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043e\u043d \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439: <em>blThreadPoolCreate<\/em> \u0438\u043b\u0438 <em>blThreadPoolGlobal<\/em>. \u0415\u0441\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u043b\u0430\u0441\u044c <em>blThreadPoolCreate<\/em> \u0438 \u0432\u0435\u0440\u043d\u0443\u043b\u0430 <em>nullptr<\/em>, \u0442\u043e \u0432\u044b\u0437\u043e\u0432\u0435\u0442\u0441\u044f no-return \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>blTraceError<\/em>, \u0438 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u043c \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <em>blThreadPoolGlobal<\/em> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static BLWrap&lt;BLInternalThreadPool> blGlobalThreadPool; BLThreadPool* blThreadPoolGlobal() noexcept { return &amp;blGlobalThreadPool; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u043d\u0430\u0447\u0438\u0442, \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>blThreadPoolGlobal<\/em> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. \u0418\u0442\u043e\u0433\u043e: \u043b\u0438\u0431\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0442\u0435\u0440\u044f\u043d\u043e, \u043b\u0438\u0431\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>threadPool<\/em> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c. \u0418\u0434\u0451\u043c \u0434\u0430\u043b\u044c\u0448\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">uint32_t n = threadPool->acquireThreads(workerThreads, workerCount,  acquireThreadFlags, &amp;reason);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>n<\/em> \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u0442\u044c. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u0442\u0430\u043a \u0438 \u043d\u0443\u043b\u0435\u0432\u044b\u043c. <\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 <em>n<\/em> \u0440\u0430\u0432\u043d\u043e 0, \u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>threadPool<\/em> \u0437\u0430\u043d\u0443\u043b\u044f\u0435\u0442\u0441\u044f. \u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>_threadPool<\/em> \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043d\u0443\u043b\u044f\u0435\u0442\u0441\u044f, \u043f\u043e\u043b\u044e <em>_workerCount<\/em> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>n<\/em>, \u0440\u0430\u0432\u043d\u043e\u0435 0. \u0418\u0442\u043e\u0433\u043e: <em>_threadPool = nullptr, _workerCount = 0.<\/em> \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u0443\u0441\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c <em>n<\/em> \u043d\u0435 \u0440\u0430\u0432\u043d\u043e 0. \u0422\u043e\u0433\u0434\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>threadPool<\/em> \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>_threadPool<\/em>. \u041f\u043e\u043b\u044e <em>_workerCount<\/em> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>n<\/em>. \u0418\u0442\u043e\u0433\u043e: <em>_threadPool <\/em>\u043d\u0435 \u0440\u0430\u0432\u0435\u043d<em> nullptr, _workerCount <\/em>\u043d\u0435 \u0440\u0430\u0432\u0435\u043d<em> 0.<\/em> \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0442\u043e\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f, \u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 <em>(_workerCount)<\/em> \u0438 <em>(_threadPool)<\/em> \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0438\u043b\u0438 \u043e\u0431\u0435 \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0435, \u0438\u043b\u0438 \u043e\u0431\u0435 \u043b\u043e\u0436\u043d\u044b\u0435. \u0417\u043d\u0430\u0447\u0438\u0442, \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0432 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u043e\u0434\u043d\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void BLRasterWorkerManager::reset() noexcept {   \/\/ ....   if (_workerCount) {     assert(_threadPool);     for (uint32_t i = 0; i &lt; _workerCount; i++)       _workDataStorage[i]->~BLRasterWorkData();     _threadPool->releaseThreads(_workerThreads, _workerCount);     _workerCount = 0;     _workerThreads = nullptr;     _workDataStorage = nullptr;     _threadPool->release();     _threadPool = nullptr;   }   \/\/ .... }<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"ispolzovanie-neinicializirovannoy-peremennoy\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \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<\/h2>\n<p>  <\/p>\n<p>V573 [CERT-EXP53-CPP] Uninitialized variable &#8216;n&#8217; was used. The variable was used to initialize itself. pixelconverter.cpp 2210<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static BLResult BL_CDECL bl_convert_multi_step(...., uint32_t w, ....) {   for (uint32_t y = h; y; y--) {       uint32_t i = w;        workOpt.origin.x = baseOriginX;       dstData = dstLine;       srcData = srcLine;        while (i) {         uint32_t n = blMin(n, intermediatePixelCount);          srcToIntermediate(&amp;ctx->first, intermediateData, 0,                            srcData, srcStride, n, 1, nullptr);         intermediateToDst(&amp;ctx->second, dstData, dstStride,                            intermediateData, 0, n, 1, &amp;workOpt);          dstData += n * dstBytesPerPixel;         srcData += n * srcBytesPerPixel;         workOpt.origin.x += int(n);          i -= n;       } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 <\/p>\n<p>  <\/p>\n<p><em>uint32_t n = blMin(n, intermediatePixelCount);<\/em>.<\/p>\n<p>  <\/p>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0445\u043e\u0442\u0435\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<p><em>uint32_t n = blMin(i, intermediatePixelCount);<\/em>.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>i<\/em> \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0446\u0438\u043a\u043b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0446\u0438\u043a\u043b\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"vsegda-istinnaya-proverka\">\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/h2>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v547\/\">V547<\/a> Expression &#8216;x >= 5&#8217; is always true. pngcodec.cpp 588<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static void blPngDeinterlaceBits(....) noexcept {   \/\/ ....   uint32_t x = w;   \/\/ ....   switch (n) {     case 2: {       \/\/ ....       if (x &lt;= 4) break;       if (x >= 5) b = uint32_t(*d5++);       \/\/ ....     }   \/\/ ....   }   \/\/ .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>n<\/em> \u0440\u0430\u0432\u043d\u043e 2 \u0438 \u043c\u044b \u0437\u0430\u0448\u043b\u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0432\u0435\u0442\u043a\u0443 switch. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>x<\/em> \u043c\u0435\u043d\u044c\u0448\u0435 <em>5<\/em>, \u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430. \u0417\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <em>x >= 5<\/em> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u0430.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0432 \u0447\u0451\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043b\u0438\u0448\u043d\u044f\u044f \u0438 \u0435\u0451 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0431\u0440\u0430\u0442\u044c. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u0437\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>x<\/em> c \u0434\u0440\u0443\u0433\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u0412\u043e\u0442 \u043e\u0434\u043d\u043e \u0438\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static void blPngDeinterlaceBits(....) noexcept {   ....   uint32_t x = w;   ....   switch (n) {     case 2: {       \/\/ ....       if (x &lt;= 4) break;       b = uint32_t(*d5++);       \/\/ ....     }     \/\/ ....   }   \/\/ .... }<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"oshibka-kopipasty\">\u041e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u044b<\/h2>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v524\/\">V524<\/a> It is odd that the body of &#8216;end&#8217; function is fully equivalent to the body of &#8216;begin&#8217; function. string.h 258<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">class BLString : public BLStringCore { public:   \/\/ ....   BL_NODISCARD   BL_INLINE const char* begin() const noexcept   {     return impl->data + impl->size;   }    BL_NODISCARD   BL_INLINE const char* end() const noexcept   {     return impl->data + impl->size;   }   \/\/ .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043b\u0438\u0446\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u044b. \u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u043b \u043c\u0435\u0442\u043e\u0434 <em>begin<\/em>, \u043e\u043d \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b \u043c\u0435\u0442\u043e\u0434 <em>end<\/em> \u0438 \u0437\u0430\u0431\u044b\u043b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0435\u043b\u043e \u043c\u0435\u0442\u043e\u0434\u0430. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">BL_NODISCARD BL_INLINE const char* begin() const noexcept {   return impl->data; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0432\u0438\u0436\u0443 \u0432\u043e\u0437\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439: &#171;\u041d\u043e, \u043f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435, \u043a\u0430\u043a \u0436\u0435 \u0442\u0430\u043a? \u041c\u044b \u0436\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437, \u0442\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u0432\u044b \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u0431\u044b\u043b \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u0435\u0442\u043e\u0434 end \u0438 \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d \u0432 begin, \u0430 \u043d\u0435 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442?&#187;. \u0422\u0430\u043a\u043e\u0435 \u0432\u043e\u0437\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0437\u0432\u0443\u0447\u0438\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0443 \u043a\u043b\u0430\u0441\u0441\u0430 <em>BLString<\/em> \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>data<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">BL_NODISCARD BL_INLINE const char* data() const noexcept { return impl->data; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0432\u043e\u0442 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/4ca\/15b\/816\/4ca15b8169622deb8223dc3ad7a6edfc.png\" alt=\"0894_Blend2d_ru\/image3.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4ca\/15b\/816\/4ca15b8169622deb8223dc3ad7a6edfc.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0442\u043e\u0434 <em>begin<\/em> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/7a5\/3d7\/b98\/7a53d7b98bd21e0d53ebd82f392da701.png\" alt=\"0894_Blend2d_ru\/image5.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7a5\/3d7\/b98\/7a53d7b98bd21e0d53ebd82f392da701.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u044f \u043d\u0430\u0448\u0435\u043b \u043f\u0435\u0440\u0435\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <em>begin<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\/\/! Returns a pointer to the beginning of string data (iterator compatibility)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u0443\u043b\u0438\u043a\u0438 \u043f\u0440\u0435\u0434\u044a\u044f\u0432\u043b\u0435\u043d\u044b, \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0441\u0432\u043e\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u0434\u0448\u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443 \u043a\u043b\u0430\u0441\u0441\u0430 <em>BLString<\/em> \u0431\u044b\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u044b <em>data<\/em> \u0438 <em>end<\/em>, \u043e\u043d\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c. \u0412\u0441\u0451 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0438 \u0432\u0441\u0435 \u0431\u044b\u043b\u0438 \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u044b, \u043d\u043e \u0442\u0443\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Blend2d \u0437\u0430\u0434\u0443\u043c\u0430\u043b\u0438\u0441\u044c \u043e\u0431 <em>iterator compatibility.<\/em> \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">BLString str; for( auto symb : str ) { .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0443 \u043a\u043b\u0430\u0441\u0441\u0430 <em>BLString<\/em> \u0431\u044b\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u044b <em>begin<\/em> \u0438 <em>end<\/em>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u043e\u0448\u043b\u0438 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 <em>begin<\/em>. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>data<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 <em>begin<\/em>. \u041d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 <em>iterator compatibility<\/em>, \u043e\u043d \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0434\u0443\u043c\u0430\u0435\u0442 \u043e \u043c\u0435\u0442\u043e\u0434\u0435 <em>data<\/em>. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0442\u0443\u0442 \u043d\u0438 \u043f\u0440\u0438 \u0447\u0451\u043c. \u0417\u0430\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u0443\u043c\u0430\u0435\u0442 \u043e \u043c\u0435\u0442\u043e\u0434\u0435 <em>end<\/em>. \u041e\u043d \u0442\u043e\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f <em>iterator compatibility<\/em>, \u0438 \u043e\u043d \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d. \u0422\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u043d\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e? \u0422\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u0435\u043b\u043e \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u041a \u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442? \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043c\u0435\u0442\u043e\u0434 <em>begin<\/em> \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>data<\/em>. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f range-based \u0446\u0438\u043a\u043b for (\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u0432\u044b\u0448\u0435) \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>  <\/p>\n<h2 id=\"eschyo-odna-oshibka-kopipasty\">\u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u044b<\/h2>\n<p>  <\/p>\n<p>V523 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. pixelconverter.cpp 1215<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">template&lt;typename PixelAccess, bool AlwaysUnaligned> static BLResult BL_CDECL bl_convert_argb32_from_prgb_any(....) {   for (uint32_t y = h; y != 0; y--) {     if (!AlwaysUnaligned &amp;&amp; blIsAligned(srcData, PixelAccess::kSize))     {       for (uint32_t i = w; i != 0; i--) {         uint32_t pix = PixelAccess::fetchA(srcData);         uint32_t r = (((pix >> rShift) &amp; rMask) * rScale) >> 16;         uint32_t g = (((pix >> gShift) &amp; gMask) * gScale) >> 8;         uint32_t b = (((pix >> bShift) &amp; bMask) * bScale) >> 8;         uint32_t a = (((pix >> aShift) &amp; aMask) * aScale) >> 24;          BLPixelOps::unpremultiply_rgb_8bit(r, g, b, a);         blMemWriteU32a(dstData, (a &lt;&lt; 24) | (r &lt;&lt; 16) | (g &lt;&lt; 8) | b);          dstData += 4;         srcData += PixelAccess::kSize;       }     }     else {       for (uint32_t i = w; i != 0; i--) {         uint32_t pix = PixelAccess::fetchA(srcData);         uint32_t r = (((pix >> rShift) &amp; rMask) * rScale) >> 16;         uint32_t g = (((pix >> gShift) &amp; gMask) * gScale) >> 8;         uint32_t b = (((pix >> bShift) &amp; bMask) * bScale) >> 8;         uint32_t a = (((pix >> aShift) &amp; aMask) * aScale) >> 24;          BLPixelOps::unpremultiply_rgb_8bit(r, g, b, a);         blMemWriteU32a(dstData, (a &lt;&lt; 24) | (r &lt;&lt; 16) | (g &lt;&lt; 8) | b);          dstData += 4;         srcData += PixelAccess::kSize;       }     }     \/\/ ....   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0448\u0438\u0431\u043a\u0438 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u044b. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 then \u0438 else-\u0432\u0435\u0442\u043a\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u042f\u0441\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0437\u0430\u0431\u044b\u043b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0432\u0435\u0442\u043e\u043a, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"idempotentnyy-cikl\">\u0418\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u044b\u0439 \u0446\u0438\u043a\u043b<\/h2>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v1044\/\">V1044<\/a> Loop break conditions do not depend on the number of iterations. otcmap.cpp 59<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">#if defined(__GNUC__)   #define BL_LIKELY(...) __builtin_expect(!!(__VA_ARGS__), 1)   #define BL_UNLIKELY(...) __builtin_expect(!!(__VA_ARGS__), 0) #else   #define BL_LIKELY(...) (__VA_ARGS__)   #define BL_UNLIKELY(...) (__VA_ARGS__) #endif .... static BLResult BL_CDECL mapTextToGlyphsFormat0(....) noexcept {   \/\/ ....   uint32_t* ptr = content;   uint32_t* end = content + count;   \/\/ ....   while (ptr != end) {     uint32_t codePoint = content[0];     uint32_t glyphId = codePoint &lt; 256                          ? uint32_t(glyphIdArray[codePoint].value())                          : uint32_t(0);     content[0] = glyphId;     if (BL_UNLIKELY(glyphId == 0)) {       if (!undefinedCount)         state->undefinedFirst = (size_t)(ptr - content);       undefinedCount++;     }   }   \/\/ .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u043d\u0438\u0435. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <em>ptr<\/em> \u0438 <em>end<\/em> \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0438\u043a\u043b\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <em>ptr != end<\/em> \u0431\u044b\u043b\u043e \u0432\u0435\u0440\u043d\u044b\u043c, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b. \u041f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0437\u0430\u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <em>ptr<\/em>. \u042f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0442\u0430\u043a\u043e\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">while (ptr != end) {   uint32_t codePoint = content[0];   uint32_t glyphId = codePoint &lt; 256                        ? uint32_t(glyphIdArray[codePoint].value())                        : uint32_t(0);   content[0] = glyphId;   if (BL_UNLIKELY(glyphId == 0)) {     if (!undefinedCount)       state->undefinedFirst = (size_t)(ptr - content);     undefinedCount++;   }   ++ptr; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/w\/v776\/\">V776<\/a> Potentially infinite loop. The variable in the loop exit condition &#8216;ptr != end&#8217; does not change its value between iterations. otcmap.cpp 59<\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0411\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u043f\u043e\u0434 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430. \u0412 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u0438 \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435. \u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442?<\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0434\u0430\u0436\u0435 \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043e\u0448\u0438\u0431\u043a\u0438 \u0435\u0441\u0442\u044c. \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \ud83d\ude42<\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0435\u0439 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 code review. \u041f\u043e\u0440\u043e\u0439 \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u043a\u043e\u0434\u0430 \u043d\u0430 20 \u0441\u0442\u0440\u043e\u043a \u043d\u0435 \u0443\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0430\u0434\u043d\u0443\u044e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u0438\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 \u043d\u0435 \u043f\u043e\u0434\u0432\u0435\u0440\u0436\u0435\u043d\u044b \u0443\u0441\u0442\u0430\u043b\u043e\u0441\u0442\u0438 \u0438 \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0433\u043e\u0442\u043e\u0432 \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0443\u0442\u043e\u043a. \u0415\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043f\u0435\u0440\u0435\u0440\u044b\u0432. \u0418 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2013 \u043e\u0442 \u0435\u0433\u043e \u0432\u0441\u0435\u0432\u0438\u0434\u044f\u0449\u0435\u0433\u043e \u043e\u043a\u0430 \u043d\u0435 \u0441\u043f\u0440\u044f\u0447\u0435\u0442\u0441\u044f \u043d\u0438 \u043e\u0434\u043d\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432 \u043a\u043e\u0434\u0435!<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0432 \u0446\u0435\u043b\u043e\u043c \u0438 PVS-Studio \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u2013 \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0435\u0433\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e <a href=\"https:\/\/pvs-studio.com\/blend2d\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e<\/a> \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<p>  <\/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: Alexander Kurenev. <a href=\"https:\/\/habr.com\/ru\/post\/593161\/\">Even small projects have bugs, or how PVS-Studio checked Blend2D<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><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\/ru\/articles\/593157\/\"> https:\/\/habr.com\/ru\/articles\/593157\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u044b \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 \u043d\u0438\u0445 \u043f\u0440\u043e\u0449\u0435 \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0438. \u0410 \u0447\u0442\u043e \u0436\u0435 PVS-Studio \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435? \u041c\u044b \u0432\u0437\u044f\u043b\u0438 Blend2D \u2013 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 2D-\u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u2013 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0441\u0432\u043e\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0448\u043b\u043e.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/2c9\/24f\/e26\/2c924fe2637af273f963fef60b1a4e12.png\" alt=\"0894_Blend2d_ru\/image1.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2c9\/24f\/e26\/2c924fe2637af273f963fef60b1a4e12.png\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041d\u0438 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u0435\u0433\u0447\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u042d\u0442\u043e \u043e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435\u043c &#171;\u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u0434\u0430 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a&#187;, \u043d\u043e \u0438 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/0158\/\">\u0440\u0430\u0441\u0442\u0451\u0442 \u0438 \u043f\u043b\u043e\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043c\u044b \u043b\u044e\u0431\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0435\u043c &#171;\u0436\u0438\u0440\u043d\u044e\u0449\u0438\u0445&#187; \u0438 \u0437\u0430\u043a\u043e\u0432\u044b\u0440\u0438\u0441\u0442\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043e\u043a. \u0414\u0430 \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 \u043a\u0443\u0447\u0435\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, legacy \u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u0432\u043a\u0443\u0441\u043d\u044f\u0448\u0435\u043a.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u044d\u0442\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435\u043c, \u044f \u0437\u0430\u0445\u043e\u0442\u0435\u043b \u043e\u0442\u043e\u0439\u0442\u0438 \u043e\u0442 \u043d\u0430\u0448\u0435\u0439 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u0431\u0440\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438. \u0420\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0432 \u043d\u0451\u043c \u0441\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 PVS-Studio. \u041c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Blend2D. \u042f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0432\u0435\u0442\u043a\u0443 master, \u043a\u043e\u043c\u043c\u0438\u0442 <a href=\"https:\/\/github.com\/blend2d\/blend2d\/tree\/c4847906ea9423fe365ccafcaff62a37df5de3aa\">c484790.<\/a><\/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-417128","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/417128","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=417128"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/417128\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=417128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=417128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=417128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}