{"id":285814,"date":"2017-05-02T16:20:04","date_gmt":"2017-05-02T12:20:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=285814"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=285814","title":{"rendered":"\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f PVS-Studio \u043c\u043e\u0436\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c Visual C++ 2017 Libraries"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/df7\/5eb\/e8d\/df75ebe8dd93a63351cd7b6e5a23c201.png\" align=\"left\"\/>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c Visual Studio, \u0447\u0442\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u0443 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430 PVS-Studio. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Visual C++ 2017, \u0438 \u0434\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044e \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Visual C++ Libraries \u043e\u0442\u0441\u0442\u0440\u0435\u043b\u0438\u0432\u0430\u044e\u0442 \u043d\u043e\u0433\u0438: \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u0438<\/h2>\n<p>  \u042d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u043c\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043f\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 Visual C++. \u041f\u0440\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.viva64.com\/ru\/b\/0163\/\">\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 Visual C++ 2012<\/a><\/li>\n<li><a href=\"https:\/\/www.viva64.com\/ru\/b\/0288\/\">\u0422\u044f\u043f-\u043b\u044f\u043f, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Visual C++ 2013 (update 3)<\/a><\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u0431\u044b\u043b \u0434\u043e\u043b\u0433\u0438\u0439 \u043f\u0435\u0440\u0435\u0440\u044b\u0432, \u0438 \u044f \u043d\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u044e \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e VS2015. \u0411\u044b\u043b\u043e <a href=\"https:\/\/www.viva64.com\/ru\/inspections\/\">\u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0436\u0434\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0425\u043e\u0442\u044f, \u0435\u0441\u043b\u0438 \u0431\u044b\u0442\u044c \u0447\u0435\u0441\u0442\u043d\u044b\u043c, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0435. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, <a href=\"https:\/\/twitter.com\/MalwareMinigun\/status\/847851006884929541\">\u0442\u0432\u0438\u0442<\/a> \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 Visual C++ (<a href=\"https:\/\/twitter.com\/MalwareMinigun\">@MalwareMinigun<\/a>) \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u043b \u043c\u043d\u0435 \u043f\u0440\u043e VS2017:<\/p>\n<p>  <i>I&#8217;m surprised we don&#8217;t have people yelling at us all the time for stuff you folks find in standard library headers.<\/i><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/208\/32d\/0e0\/20832d0e0dae315d74a5ba397b63b4f0.png\" alt=\"Picture 1\"\/><\/p>\n<p>  \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u044f \u043d\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043c\u0438\u0440\u0443 \u043e \u0431\u0430\u0433\u0430\u0445 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 Visual Studio 2017! \u0427\u0442\u043e \u0436, \u0432\u044b\u0437\u043e\u0432 \u043f\u0440\u0438\u043d\u044f\u0442!<\/p>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0442\u0432\u0438\u0442\u0430 (31 \u043c\u0430\u0440\u0442\u0430) \u043f\u0440\u043e\u0448\u0451\u043b \u043c\u0435\u0441\u044f\u0446. \u041f\u0440\u0438\u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u0437\u0430\u0442\u044f\u043d\u0443\u043b \u0441 \u043e\u0442\u0432\u0435\u0442\u043e\u043c, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044e\u0441\u044c.<\/p>\n<h2>\u0427\u0442\u043e \u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u043e\u0441\u044c<\/h2>\n<p>  \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0430\u043c\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u043c\u043d\u0435 \u0432\u0435\u0440\u0441\u0438\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio-download\/\">PVS-Studio<\/a> (6.15).<\/p>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u044f C++ \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Visual Studio 2017. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u043b\u0430\u0441\u044c \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 12.04.2017. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0435 \u0431\u0430\u0433\u0440\u0435\u043f\u043e\u0440\u0442, \u0430 \u0441\u0442\u0430\u0442\u044c\u044f, \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0443\u044e\u0449\u0430\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u043e\u043e\u0431\u0449\u0435, \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u041f\u0440\u0438\u0437\u043d\u0430\u044e\u0441\u044c, \u044f \u043d\u0435 \u0443\u0442\u0440\u0443\u0436\u0434\u0430\u043b \u0441\u0435\u0431\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f.<\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u0438\u043d\u0430\u0447\u0435 \u044f \u043d\u0435 \u0441\u043c\u043e\u0433 \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u0432\u044b\u0434\u0430\u0451\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041a\u043e\u043f\u0438\u0440\u0443\u044f \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0430\u043f\u043a\u0443, \u044f \u043e\u0431\u043c\u0430\u043d\u044b\u0432\u0430\u044e PVS-Studio, \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u043e\u0442 \u0438 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 <a href=\"https:\/\/twitter.com\/MalwareMinigun\/status\/847851006884929541\">\u0442\u0432\u0438\u0442<\/a>, \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 Visual C++ \u043d\u0435 \u043f\u0438\u0448\u0443\u0442 \u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f\u0445 PVS-Studio, \u043a\u0430\u0441\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0438\u0445 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043b\u044e\u0434\u0435\u0439. \u0417\u0430\u043e\u0434\u043d\u043e, \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043b\u0430 inline-\u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<p>  \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u044f \u043d\u0435 \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u043e-\u0447\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u044b. \u042f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043b \u043d\u043e\u0432\u044b\u0439 solution \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0442\u0443\u0434\u0430 \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0447\u0430\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. \u041d\u043e, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u2014 \u044d\u0442\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u0411\u043e\u043b\u0435\u0435 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0442\u043e\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0443\u0436\u0435 \u0441\u0430\u043c\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c Visual C++, \u0438 \u044f \u0433\u043e\u0442\u043e\u0432 \u043f\u043e\u043c\u043e\u0433\u0430\u0442\u044c \u0438\u043c \u0432 \u044d\u0442\u043e\u043c.<\/p>\n<h2>\u041b\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>  \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u044f, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443.<\/p>\n<p>  \u041c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e:<\/p>\n<ul>\n<li>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (GA) \u0441 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e High \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b 433 \u0448\u0442.<\/li>\n<li>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (GA) \u0441 \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c\u044e Medium \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b 743 \u0448\u0442.<\/li>\n<\/ul>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u044d\u0442\u0438 \u0447\u0438\u0441\u043b\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u043d\u0430 \u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432!<\/p>\n<p>  \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u0444\u0430\u0439\u043b\u043e\u0432, \u0434\u0430 \u0435\u0449\u0451 \u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. \u041f\u043b\u044e\u0441 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 \u043c\u043d\u043e\u0433\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u043e\u0436\u043d\u044b\u043c\u0438. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u043f\u0440\u0438\u0447\u0438\u043d\u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u0434\u043e\u043a\u0441\u0430.<\/p>\n<p>  \u0412\u0440\u0435\u0434\u043d\u043e \u0438 \u043e\u043f\u0430\u0441\u043d\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043b\u043e\u0445\u043e\u0439 \u0438\u0434\u0435\u0438:  <\/p>\n<pre><code class=\"cpp\">typedef unsigned long       DWORD;<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0432\u044b\u0434\u0430\u0441\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V677\/\">V677<\/a> Custom declaration of a standard &#8216;DWORD&#8217; type. The system header file should be used: #include &lt;WinDef.h&gt;.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u0440\u0430\u0432. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0442\u0438\u043f \u00ab\u0432\u0440\u0443\u0447\u043d\u0443\u044e\u00bb, \u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c Visual C++ \u0442\u0430\u043a\u0430\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430. \u0412\u0435\u0434\u044c \u0442\u0430\u043c-\u0442\u043e, \u043a\u0430\u043a \u0440\u0430\u0437, \u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b. \u0418 \u0442\u0430\u043a\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0431\u043e\u043b\u0435\u0435 250.<\/p>\n<p>  \u0418\u043b\u0438 \u0432\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u0440\u0430\u0432, \u043a\u043e\u0433\u0434\u0430 \u043a\u0440\u0438\u0442\u0438\u043a\u0443\u0435\u0442 \u043a\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>this <\/i> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <i>NULL<\/i>. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u044f\u0437\u044b\u043a\u0430 C++, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>this <\/i> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <i>NULL<\/i>.<\/p>\n<p>  \u0423 Visual C++ \u0441 \u044d\u0442\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0412\u0438\u0434\u0438\u043c\u043e, \u0432 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435 \u043e\u043d \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443, \u043d\u0443 \u0438\u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u0441\u043a\u043e\u0440\u043e. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, MFC) \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0442\u0430\u043a, \u0447\u0442\u043e <i>this <\/i> \u0440\u0430\u0432\u043d\u044b\u0439 <i>NULL<\/i> \u2014 \u044d\u0442\u043e \u0442\u0438\u043f\u043e\u0432\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f.<\/p>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <i>this<\/i>. \u0412\u043e\u0442 \u043f\u0430\u0440\u0430 \u0442\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:  <\/p>\n<pre><code class=\"cpp\">_AFXWIN_INLINE CDC::operator HDC() const { return this == NULL ? NULL : m_hDC; } _AFXWIN_INLINE HDC CDC::GetSafeHdc() const { return this == NULL ? NULL : m_hDC; }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u044b\u0434\u0430\u0441\u0442 \u0434\u043b\u044f \u043d\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>V704 &#8216;this == 0&#8217; expression should be avoided \u2014 this expression is always false on newer compilers, because &#8216;this&#8217; pointer can never be NULL. afxwin1.inl 314<\/li>\n<li>V704 &#8216;this == 0&#8217; expression should be avoided \u2014 this expression is always false on newer compilers, because &#8216;this&#8217; pointer can never be NULL. afxwin1.inl 316<\/li>\n<\/ul>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0431\u043e\u043b\u0435\u0435 40, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u043e\u043b\u043a\u0443, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u0442 \u043d\u0438\u0445 \u043d\u0435\u0442. \u0412 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0435 \u0433\u043e\u0434\u044b \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 <a href=\"http:\/\/www.viva64.com\/ru\/w\/V677\/\">V677<\/a> \u0438 <a href=\"http:\/\/www.viva64.com\/ru\/w\/V704\/\">V704<\/a>, \u043d\u0435 \u0432\u0441\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b \u043a \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c Visual C++. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043d\u0435\u0442: \u044d\u0442\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c, \u0441\u0440\u0430\u0437\u0443 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430 300 \u0448\u0442\u0443\u043a.<\/p>\n<p>  \u0412\u0441\u0451 \u044d\u0442\u043e \u044f \u043f\u0438\u0448\u0443, \u0447\u0442\u043e\u0431\u044b \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0431\u0435\u0437 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f. \u041c\u043e\u0451 \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435 \u2014 \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u043c\u0430\u043b\u043e.<\/p>\n<h2>\u0427\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043d\u0430\u0448\u0435\u043b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440<\/h2>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0439\u0442\u0438 \u043e\u0442 \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u043e\u0433\u043e \u043a \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u043c\u0443. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043c\u0435\u043b\u043a\u0438\u043c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f\u043c. \u041f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0439\u0434\u0443 \u043a \u043d\u0435\u0441\u0442\u0440\u0430\u0448\u043d\u044b\u043c \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0443 \u043f\u043e\u0432\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u00ab\u0436\u0443\u0442\u044c\u044e\u00bb. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0431\u0443\u0434\u0443 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u0442\u044c \u0433\u0440\u0430\u0434\u0443\u0441. \u0418\u0442\u0430\u043a, \u0432\u043f\u0435\u0440\u0451\u0434, \u0441\u043f\u0430\u0441\u0430\u0442\u044c \u043c\u0438\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043e\u0442 \u0431\u0430\u0433\u043e\u0432!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a7e\/ad3\/d41\/a7ead3d41f24bc0c5edf2432152d63c0.png\" alt=\"Picture 5\"\/><\/p>\n<h3>\u041c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u044f\u0434 \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0439. \u0422\u043e \u0435\u0441\u0442\u044c, \u0432\u0441\u0451 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0432 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438, \u043d\u043e \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f <a href=\"http:\/\/www.viva64.com\/ru\/w\/V808\/\">V808<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0435\u043a\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f, \u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u044d\u0442\u0443 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.  <\/p>\n<pre><code class=\"cpp\">void CMFCToolBarComboBoxButton::AdjustRect() {   ....   if (m_pWndEdit != NULL)   {     CRect rectEdit = m_rect;      const int iBorderOffset = 3;      m_pWndEdit-&gt;SetWindowPos(       NULL, m_rect.left + nHorzMargin + iBorderOffset,       m_rect.top + iBorderOffset,       m_rect.Width() - 2 * nHorzMargin - m_rectButton.Width() -         iBorderOffset - 3,       m_rectCombo.Height() - 2 * iBorderOffset,       SWP_NOZORDER | SWP_NOACTIVATE);   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V808\/\">V808<\/a> &#8216;rectEdit&#8217; object of &#8216;CRect&#8217; type was created but was not utilized. afxtoolbarcomboboxbutton.cpp 607<\/p>\n<p>  \u041e\u0431\u044a\u0435\u043a\u0442 <i>rectEdit <\/i> \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u041e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u0438 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u041a\u043e\u0434 \u0441\u0442\u0430\u043d\u0435\u0442 \u0447\u0443\u0442\u044c \u043a\u043e\u0440\u043e\u0447\u0435.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043b\u0443\u0447\u0430\u0439:  <\/p>\n<pre><code class=\"cpp\">BOOL CALLBACK AFX_EXPORT CMFCToolBarFontComboBox::EnumFamPrinterCallBackEx(....) {   ....   CString strName = pelf-&gt;elfLogFont.lfFaceName;    pCombo-&gt;AddFont((ENUMLOGFONT*)pelf, FontType,                   CString(pelf-&gt;elfScript));   return 1; }<\/code><\/pre>\n<p>  <a href=\"http:\/\/www.viva64.com\/ru\/w\/V808\/\">V808<\/a> &#8216;strName&#8217; object of &#8216;CStringT&#8217; type was created but was not utilized. afxtoolbarfontcombobox.cpp 138<\/p>\n<p>  \u041e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <i>CString<\/i> \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u041d\u0435 \u0437\u043d\u0430\u044e, \u0434\u043e\u0433\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0438\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438 \u043d\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u0435\u0442\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a <i>CStirng <\/i> \u2014 \u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u044d\u0442\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 <i>strName<\/i> \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u043e\u0449\u0435.<\/p>\n<p>  \u0418 \u0442\u0430\u043a\u0438\u0445 \u0432\u043e\u0442 \u043b\u0438\u0448\u043d\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u041f\u043e\u043c\u0438\u043c\u043e \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0435\u0449\u0451 50 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u0442\u044c\u0438, \u044f \u0432\u044b\u043f\u0438\u0441\u0430\u043b \u044d\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b: <a href=\"http:\/\/cppfiles.com\/vs2017_V808.txt\">vs2017_V808.txt<\/a>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a.  <\/p>\n<pre><code class=\"cpp\">TaskStack::~TaskStack() {   if (m_pStack)     delete [] m_pStack; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V809\/\">V809<\/a> Verifying that a pointer value is not NULL is not required. The &#8216;if (m_pStack)&#8217; check can be removed. taskcollection.cpp 29<\/p>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 <i>delete <\/i> \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043e\u0442\u0434\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434 <i>nullptr<\/i>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u043d\u0435\u0439 \u0438 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c:  <\/p>\n<pre><code class=\"cpp\">TaskStack::~TaskStack() {   delete [] m_pStack; }<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u0445 \u043b\u0438\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0442\u043e\u0436\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e. \u042f \u0432\u044b\u043f\u0438\u0441\u0430\u043b 68 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b <a href=\"http:\/\/cppfiles.com\/vs2017_V809.txt\">vs2017_V809.txt<\/a>.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043c\u0435\u043b\u043e\u0447\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u2014 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043d\u044b\u0439 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0430 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0439. \u041f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"cpp\">size_type count(const key_type&amp; _Keyval) const {   size_type _Count = 0;   const_iterator _It = _Find(_Keyval);   for (;_It != end() &amp;&amp; !this-&gt;_M_comparator(....); _It++)   {     _Count++;   }   return _Count; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V803\/\">V803<\/a> Decreased performance. In case &#8216;_It&#8217; is iterator it&#8217;s more effective to use prefix form of increment. Replace iterator++ with ++iterator. internal_concurrent_hash.h 509<\/p>\n<p>  \u0421\u0442\u0430\u043d\u0435\u0442 \u0447\u0443\u0442\u044c \u043b\u0443\u0447\u0448\u0435, \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c:  <\/p>\n<pre><code class=\"cpp\">for (;_It != end() &amp;&amp; !this-&gt;_M_comparator(....); ++_It)<\/code><\/pre>\n<p>  \u0412\u043e\u043f\u0440\u043e\u0441, \u0435\u0441\u0442\u044c \u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435, \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435: &quot;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0093\/\">\u0415\u0441\u0442\u044c \u043b\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043c\u044b\u0441\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u0442\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430 ++it, \u0432\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0441\u0442\u0444\u0438\u043a\u0441\u043d\u043e\u0433\u043e it++<\/a>&quot;. \u041e\u0442\u0432\u0435\u0442: \u0435\u0441\u0442\u044c, \u0445\u043e\u0442\u044f \u0438 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0430\u044f.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0440\u0435\u0448\u0430\u0442, \u0447\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u0432\u043e\u0442 \u0435\u0449\u0451 26 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439: <a href=\"http:\/\/cppfiles.com\/vs2017_V803.txt\">vs2017_V803.txt<\/a>.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f. \u041b\u0443\u0447\u0448\u0435 \u043e\u0447\u0438\u0449\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>str.Empty()<\/i>, \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>_T(&quot;&quot;)<\/i>. \u041a\u043b\u0430\u0441\u0441 \u0432\u0435\u0434\u044c \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u0437\u0430\u0440\u0430\u043d\u0435\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u0434\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0437\u0440\u044f \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438. \u0412 \u043e\u0431\u0449\u0435\u043c, \u043b\u0438\u0448\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.  <\/p>\n<pre><code class=\"cpp\">CString m_strRegSection;  CFullScreenImpl::CFullScreenImpl(CFrameImpl* pFrameImpl) {   m_pImpl = pFrameImpl;   m_pwndFullScreenBar = NULL;   m_bFullScreen = FALSE;   m_bShowMenu = TRUE;   m_bTabsArea = TRUE;   m_uiFullScreenID = (UINT)-1;   m_strRegSection = _T(&quot;&quot;); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V815\/\">V815<\/a> Decreased performance. Consider replacing the expression &#8216;m_strRegSection = L&quot;&quot;&#8217; with &#8216;m_strRegSection.Empty()&#8217;. afxfullscreenimpl.cpp 52<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443  <\/p>\n<pre><code class=\"cpp\">m_strRegSection = _T(&quot;&quot;);<\/code><\/pre>\n<p>  \u043d\u0430  <\/p>\n<pre><code class=\"cpp\">m_strRegSection.Empty();<\/code><\/pre>\n<p>  \u041c\u0435\u043b\u043e\u0447\u044c, \u043d\u043e \u043f\u0435\u0440\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0441\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0434 \u0442\u0430\u043a\u043e\u043c\u0443 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u0438 \u0442\u0430\u043a \u043f\u0443\u0441\u0442\u0430\u044f.<\/p>\n<p>  \u0412\u043e\u0442 \u0435\u0449\u0451 27 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443: <a href=\"http:\/\/cppfiles.com\/vs2017_V815.txt\">vs2017_V815.txt<\/a>.<\/p>\n<p>  \u0418, \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a, \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"cpp\">HRESULT  GetPropertyInfo(....) {   ....   for(ul=0; ul&lt;m_cPropSetDex; ul++)   {     ....     for(ULONG ulProp=0; ....)     {       ....       pDescBuffer += (wcslen(L&quot;UNKNOWN&quot;) + 1);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V814\/\">V814<\/a> Decreased performance. The &#8216;wcslen&#8217; function was called multiple times inside the body of a loop. atldb.h 2374<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>wcslen<\/i> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0446\u0438\u043a\u043b\u043e\u0432. \u0411\u044b\u043b\u043e \u0431\u044b \u043b\u043e\u0433\u0438\u0447\u043d\u0435\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 <i>L\u00abUNKNOWN\u00bb<\/i>.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V814\/\">V814<\/a> Decreased performance. The &#8216;wcslen&#8217; function was called multiple times inside the body of a loop. atldb.h 2438<\/p>\n<p>  \u0412\u0441\u0451, \u0441 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0447\u0435\u043c\u0443-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443.<\/p>\n<h3>\u041e\u0448\u0438\u0431\u043a\u0438 \u043c\u0435\u043b\u043a\u043e\u0433\u043e \u0438 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u043a\u0430\u043b\u0438\u0431\u0440\u0430<\/h3>\n<p>  \u0412 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439:  <\/p>\n<pre><code class=\"cpp\">#ifdef _MSC_VER #pragma warning(disable:4200) #endif  typedef struct adpcmwaveformat_tag {         WAVEFORMATEX    wfx;         WORD            wSamplesPerBlock;         WORD            wNumCoef; #if defined( _MSC_VER )                 ADPCMCOEFSET    aCoef[]; #else         ADPCMCOEFSET    aCoef[1]; #endif         } ADPCMWAVEFORMAT; typedef ADPCMWAVEFORMAT       *PADPCMWAVEFORMAT; typedef ADPCMWAVEFORMAT NEAR *NPADPCMWAVEFORMAT; typedef ADPCMWAVEFORMAT FAR  *LPADPCMWAVEFORMAT;  #ifdef _MSC_VER #pragma warning(default:4200) #endif<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V665\/\">V665<\/a> Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 2610, 2628. mmreg.h 2628<\/p>\n<p>  \u042f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0447\u0442\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0432 \u0447\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u2014 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u044b\u0434\u0435\u043b\u044e \u0441\u0443\u0442\u044c.  <\/p>\n<pre><code class=\"cpp\">#pragma warning(disable:4200) .... #pragma warning(default:4200)<\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f. \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f 4200 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0422\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443 4200 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u041a \u0441\u0432\u043e\u0435\u043c\u0443 \u043d\u0435\u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 \u0444\u0430\u0439\u043b\u0435 \u043e\u043d \u043d\u0430\u043f\u0438\u0441\u0430\u043b:  <\/p>\n<pre><code class=\"cpp\">#include &lt;mmreg.h&gt;<\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u043f\u044f\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043a\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435:  <\/p>\n<pre><code class=\"cpp\">#pragma warning(push) #pragma warning(disable:4200) .... #pragma warning(pop)<\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0433\u0434\u0435 \u0435\u0449\u0451 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f pragma warning:<\/p>\n<ul>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 586, 601. workstealingqueue.h 601<\/li>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 1669, 1697. usbioctl.h 1697<\/li>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 1631, 1646. usbioctl.h 1646<\/li>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 1490, 1518. usbioctl.h 1518<\/li>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 986, 1002. usbioctl.h 1002<\/li>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 960, 978. usbioctl.h 978<\/li>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 913, 925. usbioctl.h 925<\/li>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 861, 876. usbioctl.h 876<\/li>\n<li>V665 Possibly, the usage of &#8216;#pragma warning(default: X)&#8217; is incorrect in this context. The &#8216;#pragma warning(push\/pop)&#8217; should be used instead. Check lines: 860, 875. usbioctl.h 875<\/li>\n<\/ul>\n<p>  \u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0432 *.cpp \u0444\u0430\u0439\u043b\u0430\u0445, \u043d\u043e \u044f \u0438\u0445 \u043d\u0435 \u0441\u0442\u0430\u043b \u0432\u044b\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u043e\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 Visual C++. \u0425\u043e\u0442\u044f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0445 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 <i>new<\/i>.  <\/p>\n<pre><code class=\"cpp\">inline HRESULT CreatePhraseFromWordArray(....) {   ....   SPPHRASEELEMENT *pPhraseElement = new SPPHRASEELEMENT[cWords];   if(pPhraseElement == NULL)   {     ::CoTaskMemFree(pStringPtrArray);     return E_OUTOFMEMORY;   }   memset(pPhraseElement, 0, sizeof(SPPHRASEELEMENT) * cWords);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V668\/\">V668<\/a> There is no sense in testing the &#8216;pPhraseElement&#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. sphelper.h 2973<\/p>\n<p>  \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439. \u0412 \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, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>new <\/i> \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043c\u044b \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0451\u043c \u0432\u043d\u0443\u0442\u0440\u044c \u0442\u0435\u043b\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>if <\/i> \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>CoTaskMemFree<\/i>. \u0418, \u0432\u043e\u043e\u0431\u0449\u0435, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430\u0447\u043d\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442.<\/p>\n<p>  \u042f \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0415\u0441\u0442\u044c \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043b\u0438\u043d\u043a\u043e\u0432\u0430\u043d \u0441 <i>nothrownew.obj<\/i>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>new<\/i> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u0432. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"http:\/\/stackoverflow.com\/questions\/550451\/will-new-return-null-in-any-case\">new and delete operators<\/a>. \u0422\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 <a href=\"http:\/\/www.viva64.com\/ru\/w\/V668\/\">V668<\/a>.<\/p>\n<p>  \u041d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0441 \u0434\u0440\u0435\u0432\u043d\u0438\u0445 \u0432\u0440\u0435\u043c\u0451\u043d, \u043a\u043e\u0433\u0434\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>new <\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>NULL<\/i>. \u0422\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u043f\u043b\u043e\u0445\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b 112 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439: <a href=\"http:\/\/cppfiles.com\/vs2017_V668.txt\">vs2017_V668.txt<\/a>.<\/p>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 <a href=\"http:\/\/www.viva64.com\/ru\/w\/V730\/\">V730<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043d\u0435 \u0432\u0441\u0435 \u0447\u043b\u0435\u043d\u044b. \u041f\u043e\u044f\u0441\u043d\u044e \u0441\u0443\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u0434\u0432\u0443\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445.<\/p>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u043b\u0430\u0441\u0441 <i>CMFCScanliner<\/i>. \u0412 \u043d\u0435\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0447\u043b\u0435\u043d\u044b:  <\/p>\n<pre><code class=\"cpp\">class CMFCScanliner {   ....   private:   LPBYTE  m_line;   LPBYTE  m_line_begin;   LPBYTE  m_line_end;   size_t  m_pitch;   DWORD   m_start_row;   DWORD   m_start_col;   DWORD   m_rows;   DWORD   m_cols;   long    m_offset;   BYTE    m_channels;   size_t  m_height; };<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440:  <\/p>\n<pre><code class=\"cpp\">CMFCScanliner() {   empty(); }<\/code><\/pre>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u043d\u0435\u0447\u0435\u0433\u043e. \u041d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>empty<\/i>:  <\/p>\n<pre><code class=\"cpp\">void empty() {   m_line      = NULL;   m_pitch     = 0;   m_start_row = 0;   m_start_col = 0;   m_rows      = 0;   m_cols      = 0;   m_offset    = 0;   m_height    = 0;   m_line_begin = NULL;   m_line_end   = NULL; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V730\/\">V730<\/a> It is possible that not all members of a class are initialized inside the constructor. Consider inspecting: m_channels. afxtoolbarimages.cpp 510<\/p>\n<p>  \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u0447\u043b\u0435\u043d\u044b, \u043a\u0440\u043e\u043c\u0435 <i>m_channels<\/i>. \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c, \u044d\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0447\u043b\u0435\u043d \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0438\u0447\u0435\u043c \u0441\u0440\u0435\u0434\u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0443, \u0445\u043e\u0442\u044f \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u044f \u043d\u0435 \u043c\u043e\u0433\u0443 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <i>AFX_EVENT<\/i>.  <\/p>\n<pre><code class=\"cpp\">struct AFX_EVENT {   enum    {     event, propRequest, propChanged, propDSCNotify   };    AFX_EVENT(int eventKind);    AFX_EVENT(int eventKind, DISPID dispid, ....);    int m_eventKind;   DISPID m_dispid;   DISPPARAMS* m_pDispParams;   EXCEPINFO* m_pExcepInfo;   UINT* m_puArgError;   BOOL m_bPropChanged;   HRESULT m_hResult;   DSCSTATE m_nDSCState;   DSCREASON m_nDSCReason; };  AFX_INLINE AFX_EVENT::AFX_EVENT(int eventKind) {   m_eventKind = eventKind;   m_dispid = DISPID_UNKNOWN;   m_pDispParams = NULL;   m_pExcepInfo = NULL;   m_puArgError = NULL;   m_hResult = NOERROR;   m_nDSCState = dscNoState;   m_nDSCReason = dscNoReason; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V730\/\">V730<\/a> Not all members of a class are initialized inside the constructor. Consider inspecting: m_bPropChanged. afxpriv2.h 104<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>m_bPropChanged<\/i>.<\/p>\n<p>  \u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u044f \u043d\u0435 \u0431\u0435\u0440\u0443\u0441\u044c \u0441\u0443\u0434\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u044d\u0442\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio. \u042f \u0432\u044b\u043f\u0438\u0441\u0430\u043b \u0432 \u0444\u0430\u0439\u043b <a href=\"http:\/\/cppfiles.com\/vs2017_V730.txt\">vs2017_V730.txt<\/a> \u0435\u0449\u0451 183 \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. \u041d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0441\u0440\u0435\u0434\u0438 \u044d\u0442\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430\u0439\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u0415\u0441\u043b\u0438 \u0431\u044b \u044f \u0431\u044b\u043b \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0447\u043b\u0435\u043d\u044b \u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0434\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u044f \u0431\u044b \u043e\u0442\u043d\u0435\u0441 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0433\u043b\u0430\u0432\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u0440\u0430\u0439\u043d\u0435 \u043a\u043e\u0432\u0430\u0440\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0440\u0435\u0434\u043a\u043e \u0438 \u043d\u0435\u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \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 \u043a\u0430\u0441\u0430\u044e\u0442\u0441\u044f \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a. \u0422\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0435.  <\/p>\n<pre><code class=\"cpp\">HRESULT SetDpiCompensatedEffectInput(....) {   ....   hr = deviceContext-&gt;CreateEffect(CLSID_D2D1DpiCompensation,                                    &amp;dpiCompensationEffect);   if (SUCCEEDED(hr))   {     if (SUCCEEDED(hr))     {   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V571\/\">V571<\/a> Recurring check. The &#8216;if (((HRESULT)(hr)) &gt;= 0)&#8217; condition was already verified in line 881. d2d1_1helper.h 883<\/p>\n<p>  \u0414\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u043e\u0434\u0440\u044f\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>hr<\/i>. \u041c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0438\u043b\u0438 \u0441 \u043b\u0438\u0448\u043d\u0438\u043c \u043a\u043e\u0434\u043e\u043c, \u0438\u043b\u0438 \u044d\u0442\u043e \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435.  <\/p>\n<pre><code class=\"cpp\">void Append(_In_reads_(nLength) PCXSTR pszSrc, _In_ int nLength) {   \/\/ See comment in SetString() about why we do this   UINT_PTR nOffset = pszSrc-GetString();    UINT nOldLength = GetLength();   if (nOldLength &lt; 0)   {     \/\/ protects from underflow     nOldLength = 0;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V547\/\">V547<\/a> Expression &#8216;nOldLength &lt; 0&#8217; is always false. Unsigned type value is never &lt; 0. atlsimpstr.h 392<\/p>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>nOldLength <\/i> \u0438\u043c\u0435\u0435\u0442 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0442\u0438\u043f <i>UINT<\/i>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0443\u043b\u044f.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>FreeLibrary<\/i>.  <\/p>\n<pre><code class=\"cpp\">extern &quot;C&quot; BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID) {   ....   ::FreeLibrary(pState-&gt;m_appLangDLL);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V718\/\">V718<\/a> The &#8216;FreeLibrary&#8217; function should not be called from &#8216;DllMain&#8217; function. dllinit.cpp 639<\/p>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms683152(v=vs.85).aspx\">\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 MSDN<\/a> \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>FreeLibrary<\/i>: It is not safe to call <i>FreeLibrary<\/i> from <i>DllMain<\/i>. For more information, see the Remarks section in <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms682583(v=vs.85).aspx\">DllMain<\/a>.<\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u0435\u0437\u0435\u043d\u0438\u044e, \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e, \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043a\u043e\u0434 \u043f\u043b\u043e\u0445 \u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u044b \u0445\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0432\u043e\u0442 \u043d\u0430 \u044d\u0442\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"cpp\">template&lt;class _FwdIt&gt;   string_type transform_primary(_FwdIt _First, _FwdIt _Last) const {  \/\/ apply locale-specific case-insensitive transformation   string_type _Res;    if (_First != _Last)     {  \/\/ non-empty string, transform it     vector&lt;_Elem&gt; _Temp(_First, _Last);      _Getctype()-&gt;tolower(&amp;*_Temp.begin(),       &amp;*_Temp.begin() + _Temp.size());     _Res = _Getcoll()-&gt;transform(&amp;*_Temp.begin(),       &amp;*_Temp.begin() + _Temp.size());     }   return (_Res); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V530\/\">V530<\/a> The return value of function &#8216;tolower&#8217; is required to be utilized. regex 319<\/p>\n<p>  \u042f \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0432\u0438\u0436\u0443 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438 \u043c\u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u044f \u043d\u0435 \u0437\u043d\u0430\u044e \u043f\u0440\u0430\u0432 \u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>tolower<\/i>. \u041e\u0431\u044b\u0447\u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>tolower<\/i> \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u044f \u043d\u0435 \u0437\u043d\u0430\u044e \u043a\u0430\u043a\u0430\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>tolower<\/i> \u0437\u0434\u0435\u0441\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0438 \u043f\u0440\u043e\u0448\u0443 \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c.<\/p>\n<h3>Hardcore<\/h3>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/4dc\/719\/45d\/4dc71945d11c16b6fa1ad2308d510493.png\" alt=\"Picture 7\"\/><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">_AFXCMN_INLINE int CToolBarCtrl::GetString(   _In_ int nString,   _Out_writes_to_(cchMaxLen, return + 1) LPTSTR lpstrString,   _In_ size_t cchMaxLen) const {   ASSERT(::IsWindow(m_hWnd));   return (int) ::SendMessage(m_hWnd, ...., (LPARAM)lpstrString);   lpstrString[cchMaxLen]=_T('\\0'); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V779\/\">V779<\/a> Unreachable code detected. It is possible that an error is present. afxcmn2.inl 111<\/p>\n<p>  \u042f\u0432\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430: \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>return<\/i> \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043b\u0430 \u0446\u0438\u043a\u043b\u0430:  <\/p>\n<pre><code class=\"cpp\">HRESULT GetIndexOfPropertyInSet(   _In_ const GUID* pPropSet,   _In_ DBPROPID dwPropertyId,   _Out_ ULONG* piCurPropId,   _Out_ ULONG* piCurSet) {   HRESULT hr = GetIndexofPropSet(pPropSet, piCurSet);   if (hr == S_FALSE)     return hr;   UPROPINFO* pUPropInfo = m_pUPropSet[*piCurSet].pUPropInfo;   for(ULONG ul=0; ul&lt;m_pUPropSet[*piCurSet].cUPropInfo; ul++)   {     if( dwPropertyId == pUPropInfo[ul].dwPropId )       *piCurPropId = ul;     return S_OK;   }    return S_FALSE; }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V612\/\">V612<\/a> An unconditional &#8216;return&#8217; within a loop. atldb.h 4837<\/p>\n<p>  \u041d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0437\u0430\u0447\u0435\u043c \u0431\u044b\u043b\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0446\u0438\u043a\u043b, \u0435\u0441\u043b\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0432 \u044d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438. \u041a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0438\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e, \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0434\u043e \u043d\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u0442\u044c \u043a\u043e\u0434, \u0430 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443. \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0437\u0430\u0431\u044b\u0442\u044b \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0438, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cpp\">HRESULT GetIndexOfPropertyInSet(   _In_ const GUID* pPropSet,   _In_ DBPROPID dwPropertyId,   _Out_ ULONG* piCurPropId,   _Out_ ULONG* piCurSet) {   HRESULT hr = GetIndexofPropSet(pPropSet, piCurSet);   if (hr == S_FALSE)     return hr;   UPROPINFO* pUPropInfo = m_pUPropSet[*piCurSet].pUPropInfo;   for(ULONG ul=0; ul&lt;m_pUPropSet[*piCurSet].cUPropInfo; ul++)   {     if( dwPropertyId == pUPropInfo[ul].dwPropId )     {       *piCurPropId = ul;       return S_OK;     }   }   return S_FALSE; }<\/code><\/pre>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430, \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <i>break,<\/i> \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044e\u0442 \u0446\u0438\u043a\u043b\u044b:<\/p>\n<ul>\n<li>V612 An unconditional &#8216;break&#8217; within a loop. viewprev.cpp 476<\/li>\n<li>V612 An unconditional &#8216;break&#8217; within a loop. iomanip 489<\/li>\n<\/ul>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e Copy-Paste. \u041d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043d\u0435 \u043d\u0430\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0438 \u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0431\u043b\u043e\u043a\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0443, \u043d\u0435 \u0447\u0438\u0442\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u0430\u043b\u044c\u0448\u0435.  <\/p>\n<pre><code class=\"cpp\">void CPaneContainerManager::RemoveAllPanesAndPaneDividers() {   ASSERT_VALID(this);   POSITION pos = NULL;    for (pos = m_lstControlBars.GetHeadPosition(); pos != NULL;)   {     POSITION posSave = pos;     CBasePane* pWnd = DYNAMIC_DOWNCAST(       CBasePane, m_lstControlBars.GetNext(pos));     ASSERT_VALID(pWnd);      if (pWnd-&gt;IsPaneVisible())     {       m_lstControlBars.RemoveAt(posSave);     }   }    for (pos = m_lstSliders.GetHeadPosition(); pos != NULL;)   {     POSITION posSave = pos;     CBasePane* pWnd = DYNAMIC_DOWNCAST(       CBasePane, m_lstControlBars.GetNext(pos));     ASSERT_VALID(pWnd);      if (pWnd-&gt;IsPaneVisible())     {       m_lstSliders.RemoveAt(posSave);     }   } } <\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2dc\/ec8\/362\/2dcec83623dcef91f274a27f1493a157.png\" alt=\"Picture 3\"\/><\/p>\n<p>  \u0412\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a?<\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432 \u043f\u043e\u0441\u043f\u043e\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u0434\u0430\u043b\u0438\u0441\u044c \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u0434\u0430\u043b\u044c\u0448\u0435. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0447\u0435\u043c\u0443 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0432\u0430\u0436\u043d\u044b \u0438 \u043d\u0443\u0436\u043d\u044b: \u043e\u043d\u0438 \u043d\u0435 \u043b\u0435\u043d\u044f\u0442\u0441\u044f \u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u044e\u0442.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V778\/\">V778<\/a> Two similar code fragments were found. Perhaps, this is a typo and &#8216;m_lstSliders&#8217; variable should be used instead of &#8216;m_lstControlBars&#8217;. afxpanecontainermanager.cpp 1645<\/p>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \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, \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 \u043a\u043e\u0434\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0441\u043e\u043a\u0440\u0430\u0449\u0443 \u0435\u0433\u043e, \u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0432\u0430\u0436\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0430\u0441:  <\/p>\n<pre><code class=\"cpp\">for (... m_lstControlBars ...) {   CBasePane* pWnd = ... m_lstControlBars ...   m_lstControlBars.RemoveAt(); }  for (... m_lstSliders ...) {   CBasePane* pWnd = ... m_lstControlBars ...   m_lstSliders.RemoveAt(); }<\/code><\/pre>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <i>m_lstControlBars<\/i>, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <i>m_lstSliders<\/i>.<\/p>\n<p>  \u0421 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e 99%, \u0432\u0442\u043e\u0440\u043e\u0439 \u0446\u0438\u043a\u043b \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 Copy-Paste: \u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0446\u0438\u043a\u043b, \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432 \u043d\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 \u0438\u043c\u044f <i>m_lstControlBars <\/i> \u043d\u0430 <i>m_lstSliders<\/i>. \u041d\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u0437\u0430\u0431\u044b\u043b\u0438!<\/p>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0434\u0435\u0441\u044c: CBasePane* pWnd =\u2026 <b>m_lstControlBars<\/b>\u2026<\/p>\n<p>  \u042d\u0442\u043e \u0431\u044b\u043b\u0430 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043d\u0435 \u0443\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0435\u0439 \u043f\u043e \u043a\u0440\u0430\u0441\u043e\u0442\u0435. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430\/\u0434\u0435\u043a\u0440\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <i>CMFCScanliner<\/i>:  <\/p>\n<pre><code class=\"cpp\">class CMFCScanliner {   ....   inline  const CMFCScanliner&amp; operator ++ ()   {     m_line += m_offset;     return *this;   }    inline  const CMFCScanliner&amp; operator ++ (int)   {     m_line += m_offset;     return *this;   }    inline  const CMFCScanliner&amp; operator -- ()   {     m_line -= m_offset;     return *this;   }    inline  const CMFCScanliner&amp; operator -- (int)   {     m_line += m_offset;     return *this;   }   .... };<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V524\/\">V524<\/a> It is odd that the body of &#8216;&#8212;&#8216; function is fully equivalent to the body of &#8216;++&#8217; function. afxtoolbarimages.cpp 656<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u0417\u0430\u0431\u044b\u043b\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c <i>+=<\/i> \u043d\u0430 <i>-=<\/i>. \u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430! \u042d\u0442\u043e &quot;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0260\/\">\u044d\u0444\u0444\u0435\u043a\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438<\/a>&quot; \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438!<\/p>\n<p>  \u041d\u0430\u0448\u043b\u043e\u0441\u044c \u0442\u0440\u0438 \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u0443\u0442\u0435\u0447\u043a\u0438. \u0412\u043e\u0442 \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445:  <\/p>\n<pre><code class=\"cpp\">CSpinButtonCtrl* CMFCPropertyGridProperty::CreateSpinControl(   CRect rectSpin) {   ASSERT_VALID(this);   ASSERT_VALID(m_pWndList);    CSpinButtonCtrl* pWndSpin = new CMFCSpinButtonCtrl;    if (!pWndSpin-&gt;Create(WS_CHILD | WS_VISIBLE | UDS_ARROWKEYS |                         UDS_SETBUDDYINT | UDS_NOTHOUSANDS,                         rectSpin, m_pWndList,                         AFX_PROPLIST_ID_INPLACE))   {     return NULL;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V773\/\">V773<\/a> The function was exited without releasing the &#8216;pWndSpin&#8217; pointer. A memory leak is possible. afxpropertygridctrl.cpp 1490<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>Create <\/i> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0451\u043d \u043e\u0431\u044a\u0435\u043a\u0442, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>pWndSpin<\/i>.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e:<\/p>\n<ul>\n<li>V773 The function was exited without releasing the &#8216;pList&#8217; pointer. A memory leak is possible. afxribboncombobox.cpp 461<\/li>\n<li>V773 The function was exited without releasing the &#8216;pButton&#8217; pointer. A memory leak is possible. afxvslistbox.cpp 222<\/li>\n<\/ul>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443 \u044f\u0437\u044b\u043a\u0430 C++, \u0432\u044b\u0437\u043e\u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>delete <\/i> \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0442\u0438\u043f\u0430 <i>void*<\/i> \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e. \u0418, \u043a\u0430\u043a \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0441\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c, \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445 Visual C++:  <\/p>\n<pre><code class=\"cpp\">typedef void *PVOID; typedef PVOID PSECURITY_DESCRIPTOR;  class CSecurityDescriptor {   ....   PSECURITY_DESCRIPTOR m_pSD;   .... };  inline CSecurityDescriptor::~CSecurityDescriptor() {   delete m_pSD;        \/\/ &lt;= \u0427\u043b\u0435\u043d m_pSD \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f void *   free(m_pOwner);   free(m_pGroup);   free(m_pDACL);   free(m_pSACL); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V772\/\">V772<\/a> Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. atlcom.h 1039<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c:<\/p>\n<ul>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. atlcom.h 1048<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. atlcom.h 1070<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. atlcom.h 1667<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. afxstate.cpp 265<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. dbcore.cpp 1240<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. dbcore.cpp 1250<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. doccore.cpp 1654<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. dockstat.cpp 343<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. filefind.cpp 43<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. filefind.cpp 49<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. sockcore.cpp 541<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. winfrm.cpp 145<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. winfrm.cpp 465<\/li>\n<li>V772 Calling a &#8216;delete&#8217; operator for a void pointer will cause undefined behavior. mapiunicodehelp.h 168<\/li>\n<\/ul>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <i>CMFCReBar::CalcFixedLayout<\/i> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>bStretch<\/i>, \u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0435\u0433\u043e. \u0412\u0435\u0440\u043d\u0435\u0435, \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0432\u044b\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u0432 <i>bStretch<\/i> \u044f\u0432\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f 1. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u043f\u0443\u0442\u0430\u043b \u0438 \u043d\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0446\u0435\u043b\u0438\u043a\u043e\u043c.  <\/p>\n<pre><code class=\"cpp\">CSize CMFCReBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz) {   ASSERT_VALID(this);   ENSURE(::IsWindow(m_hWnd));    \/\/ the union of the band rectangles is the total bounding rect   int nCount = (int) DefWindowProc(RB_GETBANDCOUNT, 0, 0);   REBARBANDINFO rbBand;   rbBand.cbSize = m_nReBarBandInfoSize;   int nTemp;    \/\/ sync up hidden state of the bands   for (nTemp = nCount; nTemp--; )   {     rbBand.fMask = RBBIM_CHILD|RBBIM_STYLE;     VERIFY(DefWindowProc(RB_GETBANDINFO, nTemp,                          (LPARAM)&amp;rbBand));     CPane* pBar = DYNAMIC_DOWNCAST(       CPane, CWnd::FromHandlePermanent(rbBand.hwndChild));     BOOL bWindowVisible;     if (pBar != NULL)       bWindowVisible = pBar-&gt;IsVisible();     else       bWindowVisible = (::GetWindowLong(         rbBand.hwndChild, GWL_STYLE) &amp; WS_VISIBLE) != 0;     BOOL bBandVisible = (rbBand.fStyle &amp; RBBS_HIDDEN) == 0;     if (bWindowVisible != bBandVisible)       VERIFY(DefWindowProc(RB_SHOWBAND, nTemp, bWindowVisible));   }    \/\/ determine bounding rect of all visible bands   CRect rectBound; rectBound.SetRectEmpty();   for (nTemp = nCount; nTemp--; )   {     rbBand.fMask = RBBIM_STYLE;     VERIFY(DefWindowProc(RB_GETBANDINFO, nTemp,                          (LPARAM)&amp;rbBand));     if ((rbBand.fStyle &amp; RBBS_HIDDEN) == 0)     {       CRect rect;       VERIFY(DefWindowProc(RB_GETRECT, nTemp, (LPARAM)&amp;rect));       rectBound |= rect;     }   }    \/\/ add borders as part of bounding rect   if (!rectBound.IsRectEmpty())   {     CRect rect; rect.SetRectEmpty();     CalcInsideRect(rect, bHorz);     rectBound.right -= rect.Width();     rectBound.bottom -= rect.Height();   }   bStretch = 1;   return CSize((bHorz &amp;&amp; bStretch) ? 32767 : rectBound.Width(),     (!bHorz &amp;&amp; bStretch) ? 32767 : rectBound.Height()); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V763\/\">V763<\/a> Parameter &#8216;bStretch&#8217; is always rewritten in function body before being used. afxrebar.cpp 209<\/p>\n<p>  \u0421\u0442\u0440\u043e\u043a\u0430 \u00abbStretch = 1;\u00bb \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u0435\u0451 \u043a\u0442\u043e-\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0431\u044b\u043b \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e. \u041f\u0440\u043e\u0448\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u0438\u043c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <i>AdjustDockingLayout <\/i> \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <i>CBasePane<\/i> \u0438 <i>CDockSite<\/i>.  <\/p>\n<pre><code class=\"cpp\">class CBasePane : public CWnd {   ....   virtual void AdjustDockingLayout(HDWP hdwp = NULL);   .... };  class CDockSite : public CBasePane {   ....   virtual void AdjustDockingLayout();   .... };<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V762\/\">V762<\/a> It is possible a virtual function was overridden incorrectly. See first argument of function &#8216;AdjustDockingLayout&#8217; in derived class &#8216;CDockSite&#8217; and base class &#8216;CBasePane&#8217;. afxdocksite.h 94<\/p>\n<p>  \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <i>hdwp<\/i>, \u0430 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435-\u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0435 \u0437\u0430\u0431\u044b\u043b\u0438. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0434\u0432\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u0421\u0445\u043e\u0436\u0438\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>V762 It is possible a virtual function was overridden incorrectly. See first argument of function &#8216;CopyState&#8217; in derived class &#8216;CPane&#8217; and base class &#8216;CBasePane&#8217;. afxpane.h 96<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See first argument of function &#8216;CopyState&#8217; in derived class &#8216;CDockablePane&#8217; and base class &#8216;CPane&#8217;. afxdockablepane.h 184<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See second argument of function &#8216;SizeToContent&#8217; in derived class &#8216;CMFCLinkCtrl&#8217; and base class &#8216;CMFCButton&#8217;. afxlinkctrl.h 50<\/li>\n<li>V762 It is possible a virtual function was overridden incorrectly. See first argument of function &#8216;RecalcLayout&#8217; in derived class &#8216;CMFCTasksPane&#8217; and base class &#8216;CPane&#8217;. afxtaskspane.h 287<\/li>\n<\/ul>\n<p>  \u0420\u0430\u0437 \u0443\u0436 \u043c\u044b \u0437\u0430\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445, \u0432\u0435\u0440\u043d\u0435\u0435, \u043e\u0431 \u0438\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 \u043a\u043b\u0430\u0441\u0441 <i>CAccessToken<\/i>:  <\/p>\n<pre><code class=\"cpp\">class CAccessToken {   ....   mutable CRevert *m_pRevert; };  inline bool CAccessToken::ImpersonateLoggedOnUser() const throw(...) {   ....   delete m_pRevert;   m_pRevert = _ATL_NEW CRevertToSelf;   .... }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V599\/\">V599<\/a> The virtual destructor is not present, although the &#8216;CRevert&#8217; class contains virtual functions. atlsecurity.h 5252<\/p>\n<p>  \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0447\u043b\u0435\u043d <i>m_pRevert<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <i>CRevert<\/i>. \u041a\u043b\u0430\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u043d\u043e. \u041a \u0442\u0430\u043a\u043e\u043c\u0443 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0439\u0442\u0438, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0430 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043a\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"cpp\">m_pRevert = _ATL_NEW CRevertToSelf;<\/code><\/pre>\n<p>  \u041a\u043b\u0430\u0441\u0441 <i>CRevertToSelf<\/i> \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <i>CRevert<\/i>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u044d\u0442\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438:  <\/p>\n<pre><code class=\"cpp\">class CRevert { public:   virtual bool Revert() throw() = 0; };  class CRevertToSelf : public CRevert { public:   bool Revert() throw()   {     return 0 != ::RevertToSelf();   } };<\/code><\/pre>\n<p>  \u0427\u0435\u0433\u043e \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 <i>CRevert<\/i>? \u0412 \u043d\u0451\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u041c\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u043d\u043e\u0432\u044b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438, \u043d\u043e \u0438 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u0435\u043c \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 V611 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.  <\/p>\n<pre><code class=\"cpp\">template &lt;class TAccessor&gt; class CBulkRowset : public CRowset&lt;TAccessor&gt; {   ....   void SetRows(_In_ DBROWCOUNT nRows) throw()   {     if (nRows == 0)       nRows = 10;     if (nRows != m_nRows)     {       delete m_phRow;       m_phRow = NULL;       m_nRows = nRows;     }   }    HRESULT BindFinished() throw()   {     m_nCurrentRows = 0;     m_nCurrentRow  = 0;     m_hr = S_OK;      if (m_phRow == NULL)     {       m_phRow = _ATL_NEW HROW[m_nRows];       if (m_phRow == NULL)         return E_OUTOFMEMORY;     }      return S_OK;   }   ....   HROW*   m_phRow;   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V611\/\">V611<\/a> The memory was allocated using &#8216;new T[]&#8217; operator but was released using the &#8216;delete&#8217; operator. Consider inspecting this code. It&#8217;s probably better to use &#8216;delete [] m_phRow;&#8217;. atldbcli.h 5689<\/p>\n<p>  \u041f\u0430\u043c\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>BindFinished<\/i> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>new []<\/i>:  <\/p>\n<pre><code class=\"cpp\">m_phRow = _ATL_NEW HROW[m_nRows];<\/code><\/pre>\n<p>  \u041f\u0430\u043c\u044f\u0442\u044c \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>SetRows<\/i> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>delete<\/i>:  <\/p>\n<pre><code class=\"cpp\">delete m_phRow;<\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u043e\u0434\u043d\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>memset<\/i>. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434, \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043a\u043e\u0434, \u0433\u0434\u0435 \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e.<\/p>\n<p>  \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"cpp\">void CToolTipCtrl::FillInToolInfo(TOOLINFO&amp; ti, ....) const {   memset(&amp;ti, 0, sizeof(AFX_OLDTOOLINFO));   ti.cbSize = sizeof(AFX_OLDTOOLINFO);   .... }<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0442\u0438\u043f\u043e\u0432\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f. \u0412\u0441\u0435 \u0447\u043b\u0435\u043d\u044b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u0447\u0438\u0449\u0430\u044e\u0442\u0441\u044f (\u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0443\u043b\u044f\u043c\u0438) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>memset<\/i>. \u0417\u0430\u0442\u0435\u043c \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0451 \u0440\u0430\u0437\u043c\u0435\u0440. \u042d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0434\u043b\u044f WinAPI. \u0422\u0430\u043a \u043c\u043d\u043e\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u0437\u043d\u0430\u044e\u0442 \u0441 \u043a\u0430\u043a\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 (\u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c) \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442.<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043a\u043e\u0434\u0435 \u0432\u0441\u0451 \u043b\u043e\u0433\u0438\u0447\u043d\u043e. \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <i>AFX_OLDTOOLINFO<\/i>. \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>memset <\/i> \u0438 \u044d\u0442\u043e\u0442 \u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"cpp\">BOOL CControlBar::PreTranslateMessage(MSG* pMsg) {   ....   TOOLINFO ti; memset(&amp;ti, 0, sizeof(AFX_OLDTOOLINFO));   ti.cbSize = sizeof(TOOLINFO);   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V512\/\">V512<\/a> A call of the &#8216;memset&#8217; function will lead to underflow of the buffer &#8216;&amp; ti&#8217;. barcore.cpp 384<\/p>\n<p>  \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <i>TOOLINFO<\/i>. \u0418\u043c\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b <i>TOOLINFO<\/i> \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 \u043d\u0435\u0451: <i>ti.cbSize = sizeof(TOOLINFO);<\/i>.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043d\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u043c\u044b\u0445 \u0431\u0430\u0439\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f <i>sizeof(AFX_OLDTOOLINFO)<\/i>.<\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435, \u0447\u0430\u0441\u0442\u044c \u043f\u043e\u043b\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 <i>memset <\/i> \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0435 \u0432\u0441\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.  <\/p>\n<pre><code class=\"cpp\">GUID m_Id; void zInternalStart() {   ....   \/\/ Zero the activity id in case we end up logging the stop.   ZeroMemory(&amp;m_Id, sizeof(&amp;m_Id));   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V512\/\">V512<\/a> A call of the &#8216;memset&#8217; function will lead to underflow of the buffer &#8216;&amp; m_Id&#8217;. traceloggingactivity.h 656<\/p>\n<p>  \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u043e\u0431\u043d\u0443\u043b\u044f\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0435 4 \u0438\u043b\u0438 8 \u0431\u0430\u0439\u0442, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f 32-\u0431\u0438\u0442\u043d\u043e\u0435 \u0438\u043b\u0438 64-\u0431\u0438\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 GUID \u0436\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 16 \u0431\u0430\u0439\u0442 (128 \u0431\u0438\u0442).<\/p>\n<p>  \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:  <\/p>\n<pre><code class=\"cpp\">ZeroMemory(&amp;m_Id, sizeof(m_Id));<\/code><\/pre>\n<p>  \u041d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c \u0438 \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 <a href=\"http:\/\/www.viva64.com\/ru\/w\/V595\/\">V595<\/a>. \u0412 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0430 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0432\u044b\u044f\u0432\u043b\u044f\u0435\u0442 <a href=\"https:\/\/www.viva64.com\/ru\/examples\/V595\/\">\u043e\u0434\u043d\u0443 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a<\/a> \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C \u0438 C++. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432 C# <a href=\"https:\/\/www.viva64.com\/ru\/examples\/V3095\/\">\u0432\u0441\u0451 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e<\/a>.<\/p>\n<p>  \u0421\u0443\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438.  <\/p>\n<pre><code class=\"cpp\">HRESULT CBasePane::get_accHelp(VARIANT varChild, BSTR *pszHelp) {   if ((varChild.vt == VT_I4) &amp;&amp; (varChild.lVal == CHILDID_SELF))   {     *pszHelp = SysAllocString(L&quot;ControlPane&quot;);     return S_OK;   }    if (((varChild.vt != VT_I4) &amp;&amp; (varChild.lVal != CHILDID_SELF))       || (NULL == pszHelp))   {     return E_INVALIDARG;   }   .... }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V595\/\">V595<\/a> The &#8216;pszHelp&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1324, 1328. afxbasepane.cpp 1324<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cpp\">VARIANT foo; foo.vt = VT_I4; foo.lVal = CHILDID_SELF; get_accHelp(foo, NULL);<\/code><\/pre>\n<p>  \u0422\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 <i>E_INVALIDARG<\/i>, \u043d\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0438\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <i>NULL<\/i>. \u0420\u0430\u0437 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u0442\u043e \u0432\u0438\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c. \u0415\u0441\u043b\u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442 \u0431\u0435\u0434\u0430. \u0410\u0433\u0430, \u043d\u0430\u0434\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c!<\/p>\n<p>  \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u044d\u0442\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Visual C++ \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c. \u0412\u043e\u0442 \u0435\u0449\u0451 17 \u043c\u0435\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0436\u0434\u0443\u0442 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430: <a href=\"http:\/\/cppfiles.com\/vs2017_V595.txt\">vs2017_V595.txt<\/a>.<\/p>\n<p>  \u0418 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0441 \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u043c\u0438 FALSE \u0438 S_FALSE.  <\/p>\n<pre><code class=\"cpp\">BOOL CMFCRibbonPanel::OnSetAccData (long lVal) {   ....   if (nIndex &lt; 0 || nIndex &gt;= arElements.GetSize())   {     return FALSE;   }    if (GetParentWnd()-&gt;GetSafeHwnd() == NULL)   {     return S_FALSE;   }    ASSERT_VALID(arElements[nIndex]);   return arElements[nIndex]-&gt;SetACCData(GetParentWnd(), m_AccData); }<\/code><\/pre>\n<p>  \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"http:\/\/www.viva64.com\/ru\/w\/V716\/\">V716<\/a> Suspicious type conversion in return statement: returned HRESULT, but function actually returns BOOL. afxribbonpanel.cpp 4107<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0438\u043f <i>BOOL<\/i>. \u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <i>HWND<\/i> \u0443 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043e\u043a\u043d\u0430, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0445\u043e\u0442\u0435\u043b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <i>FALSE<\/i>. \u041d\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u0430\u043b\u0441\u044f \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b <i>S_FALSE<\/i>, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442.<\/p>\n<p>  \u0412\u043e\u0442 \u043a\u0430\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 S_FALSE:   <\/p>\n<pre><code class=\"cpp\">#define S_FALSE ((HRESULT)1L)<\/code><\/pre>\n<p>  \u042f \u0434\u0443\u043c\u0430\u044e, \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043d\u043e \u043d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043f\u043e\u044f\u0441\u043d\u044e.<\/p>\n<p>  \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u00abreturn S_FALSE;\u00bb \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u00abreturn TRUE;\u00bb. Epic fail.<\/p>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0435 \u043e\u0434\u0438\u043d\u043e\u043a\u0430, \u0443 \u043d\u0435\u0451 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0437\u044c\u044f:<\/p>\n<ul>\n<li>V716 Suspicious type conversion in return statement: returned HRESULT, but function actually returns BOOL. afxribbonbar.cpp 5623<\/li>\n<li>V716 Suspicious type conversion in return statement: returned HRESULT, but function actually returns BOOL. afxribbonbar.cpp 5627<\/li>\n<li>V716 Suspicious type conversion in return statement: returned HRESULT, but function actually returns BOOL. ctlnownd.cpp 349<\/li>\n<li>V716 Suspicious type conversion in return statement: returned HRESULT, but function actually returns BOOL. olecli2.cpp 548<\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/h3>\n<p>  \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u043d\u0435 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b. \u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a, \u044f \u043c\u043e\u0433 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0438 \u0441\u0440\u0435\u0434\u0438 \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u044d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043a\u0430\u043a \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u041d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0430\u043c\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0442 \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<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/2e4\/862\/9e8\/2e48629e8817e804901983cdfe9f0359.png\" alt=\"Picture 4\"\/><\/p>\n<p>  \u042f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0440\u0430\u0437 \u0441\u043c\u043e\u0433 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u043a\u0430\u043a\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u0443 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442\u044c \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 \u043a\u043e\u0434\u0430.<\/p>\n<p>  \u0425\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0435\u0440\u0435\u0447\u044c \u043e\u0442 \u043e\u0434\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438. \u0412\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u044f \u0441\u043b\u044b\u0448\u0443, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043a \u0440\u0435\u043b\u0438\u0437\u0443. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0442 \u0438 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0442\u043e \u043e\u043d \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u043e\u0448\u0438\u0431\u0430\u0435\u0442\u0441\u044f, \u0438 \u043f\u0440\u043e\u0448\u0443 \u0432\u0430\u0441 \u043d\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043f\u0443\u0442\u044c \u0438\u0441\u0442\u0438\u043d\u043d\u044b\u0439. \u042d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432. \u042d\u0442\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u0440\u0435\u043b\u0438\u0437\u043e\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0445 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0432.<\/p>\n<p>  \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432\u0441\u0435\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b.<\/p>\n<p>  \u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio\/\">https:\/\/www.viva64.com\/ru\/pvs-studio\/<\/a><\/p>\n<p>  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b:<\/p>\n<ul>\n<li>Windows. Visual Studio 2017 C, C++, C++\/CLI, C++\/CX (WinRT), C#<\/li>\n<li>Windows. Visual Studio 2015 C, C++, C++\/CLI, C++\/CX (WinRT), C#<\/li>\n<li>Windows. Visual Studio 2013 C, C++, C++\/CLI, C++\/CX (WinRT), C#<\/li>\n<li>Windows. Visual Studio 2012 C, C++, C++\/CLI, C++\/CX (WinRT), C#<\/li>\n<li>Windows. Visual Studio 2010 C, C++, C++\/CLI, C#<\/li>\n<li>Windows. MinGW C, C++<\/li>\n<li>Windows\/Linux. Clang C, C++<\/li>\n<li>Linux. GCC C, C++<\/li>\n<\/ul>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0442\u0432\u0438\u0442\u0442\u0435\u0440 <a href=\"https:\/\/twitter.com\/Code_Analysis\">@Code_Analysis<\/a>.<\/p>\n<p>  <a href=\"http:\/\/www.viva64.com\/en\/b\/0502\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8d2\/41b\/5bf\/8d241b5bf34747169141ed7c1997143b.png\" \/><\/div>\n<p><\/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=\"http:\/\/www.viva64.com\/en\/b\/0502\/\">How to Improve Visual C++ 2017 Libraries Using PVS-Studio<\/a><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441?<\/b><\/p>\n<div class=\"spoiler_text\">\u0427\u0430\u0441\u0442\u043e \u043a \u043d\u0430\u0448\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u0437\u0430\u0434\u0430\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043d\u0438\u0445 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0437\u0434\u0435\u0441\u044c: <a href=\"http:\/\/www.viva64.com\/ru\/a\/0085\/\">\u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e PVS-Studio, \u0432\u0435\u0440\u0441\u0438\u044f 2015<\/a>. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c.<\/div>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/327784\/\"> https:\/\/habrahabr.ru\/post\/327784\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/df7\/5eb\/e8d\/df75ebe8dd93a63351cd7b6e5a23c201.png\" align=\"left\"\/>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c Visual Studio, \u0447\u0442\u043e \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u0443 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430 PVS-Studio. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Visual C++ 2017, \u0438 \u0434\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044e \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Visual C++ Libraries \u043e\u0442\u0441\u0442\u0440\u0435\u043b\u0438\u0432\u0430\u044e\u0442 \u043d\u043e\u0433\u0438: \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0438 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e.  <\/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-285814","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285814","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=285814"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/285814\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}