{"id":318117,"date":"2021-02-16T21:00:47","date_gmt":"2021-02-16T21:00:47","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=318117"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=318117","title":{"rendered":"\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u0442 \u043f\u0440\u0438\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043b\u0438 77 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432 \u0432 Qt 6"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rf\/oj\/f_\/rfojf_keq9czr_egygfakiowdby.png\" alt=\"PVS-Studio \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 Qt 6\"><br \/>  \u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0440\u0435\u043b\u0438\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Qt 6, \u0438 \u044d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u0432\u043e\u0434\u043e\u043c \u0432\u043d\u043e\u0432\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0430\u0442. \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0430\u043a PVS-Studio, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u042d\u0442\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043f\u043e\u043b\u043d\u0438\u0442 \u043d\u0430\u0448\u0443 &quot;<a href=\"https:\/\/www.viva64.com\/ru\/inspections\/\">\u0434\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0430\u0437\u0443<\/a>&quot; \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0441\u0442\u0438 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f PVS-Studio \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430. \u0425\u043e\u0442\u044f \u043c\u044b \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u043f\u0440\u043e \u043f\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Qt (<a href=\"https:\/\/www.viva64.com\/ru\/a\/0075\/\">\u0432 2011<\/a>, <a href=\"https:\/\/www.viva64.com\/ru\/b\/0251\/\">\u0432 2014<\/a> \u0438 <a href=\"https:\/\/www.viva64.com\/ru\/b\/0584\/\">\u0432 2018<\/a>), \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u043d\u043e\u0432\u044c. \u0422\u0430\u043a, \u043c\u044b \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e, \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0443\u044e \u043c\u044b\u0441\u043b\u044c: \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e!<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0443\u043c\u0435\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u0435\u0439\u0448\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u0418, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0431\u044b\u0441\u0442\u0440\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0438. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0431\u0449\u0435\u0433\u043e \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\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. \u041a\u043e\u0433\u0434\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u0451\u0448\u0435\u0432\u043e.<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0451, \u0442\u0435\u043e\u0440\u0438\u044f \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043d\u0430\u0441 \u0436\u0434\u0451\u0442 \u0432 \u043a\u043e\u0434\u0435. \u0410 \u043f\u043e\u043a\u0430 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio-download\/\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c PVS-Studio<\/a> \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f \u0432 \u0432\u0430\u0448\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 :).<\/p>\n<p>  <\/p>\n<h2 id=\"daty\">\u0414\u0430\u0442\u044b<\/h2>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u043d\u0430\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043a\u043e\u0434\u0430, \u0433\u0434\u0435 \u043b\u044e\u0431\u044f\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0438. \u041e\u043d, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u043d\u044b\u0439, \u043a\u0430\u043a <a href=\"https:\/\/www.viva64.com\/ru\/b\/0509\/\">\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/www.viva64.com\/ru\/b\/0260\/\">\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438<\/a> \u0432 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0430\u0445. \u0420\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043f\u0440\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0441 \u0434\u0430\u0442\u0430\u043c\u0438. \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0441\u043b\u043e\u0436\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u044d\u0442\u0438 \u043d\u0435\u0434\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u0430\u0445 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u0440\u043e \u043f\u0430\u0440\u0443 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &quot;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0776\/\">\u041f\u043e\u0447\u0435\u043c\u0443 PVS-Studio \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u043a\u043e\u0434\u0430<\/a>&quot;.<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0438\u0441\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u0442 \u0438 \u0432 Qt. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441 \u043d\u0438\u0445 \u0438 \u043d\u0430\u0447\u043d\u0451\u043c.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N1: \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043e\u0448\u0438\u0431\u043a\u0438<\/strong><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0430\u044f \u043d\u043e\u043c\u0435\u0440 \u043c\u0435\u0441\u044f\u0446\u0430 \u043f\u043e \u0435\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0451\u043d\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static const char qt_shortMonthNames[][4] = {     &quot;Jan&quot;, &quot;Feb&quot;, &quot;Mar&quot;, &quot;Apr&quot;, &quot;May&quot;, &quot;Jun&quot;,     &quot;Jul&quot;, &quot;Aug&quot;, &quot;Sep&quot;, &quot;Oct&quot;, &quot;Nov&quot;, &quot;Dec&quot; };  static int fromShortMonthName(QStringView monthName) {   for (unsigned int i = 0;        i &lt; sizeof(qt_shortMonthNames) \/ sizeof(qt_shortMonthNames[0]); ++i)   {     if (monthName == QLatin1String(qt_shortMonthNames[i], 3))       return i + 1;   }   return -1; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u043c\u0435\u0440 \u043c\u0435\u0441\u044f\u0446\u0430 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 1 \u0434\u043e 12). \u0415\u0441\u043b\u0438 \u0438\u043c\u044f \u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (-1). \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 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0442\u0430\u043c, \u0433\u0434\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0435\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043e \u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>fromShortMonthName<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">QDateTime QDateTime::fromString(QStringView string, Qt::DateFormat format) {   ....   month = fromShortMonthName(parts.at(1));   if (month)     day = parts.at(2).toInt(&amp;ok);    \/\/ If failed, try day then month   if (!ok || !month || !day) {     month = fromShortMonthName(parts.at(2));     if (month) {       QStringView dayPart = parts.at(1);       if (dayPart.endsWith(u'.'))         day = dayPart.chopped(1).toInt(&amp;ok);     }   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u043e\u043c\u0435\u0440\u0430 \u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u044e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u043c\u0435\u0441\u044f\u0446\u0430. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0432\u0438\u0434\u0438\u0442 \u0437\u0434\u0435\u0441\u044c \u0446\u0435\u043b\u044b\u0439 \u0431\u0443\u043a\u0435\u0442 \u043d\u0435\u0441\u043e\u0441\u0442\u044b\u043a\u043e\u0432\u043e\u043a, \u043e \u0447\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>V547 [CWE-571] Expression &#8216;month&#8217; is always true. qdatetime.cpp 4907<\/li>\n<li>V560 [CWE-570] A part of conditional expression is always false: !month. qdatetime.cpp 4911<\/li>\n<li>V547 [CWE-571] Expression &#8216;month&#8217; is always true. qdatetime.cpp 4913<\/li>\n<li>V560 [CWE-570] A part of conditional expression is always false: !month. qdatetime.cpp 4921<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N2: \u043e\u0448\u0438\u0431\u043a\u0430 \u043b\u043e\u0433\u0438\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u0442\u044b<\/strong><\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0439 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">enum {   ....   MSECS_PER_DAY = 86400000,   ....   SECS_PER_MIN = 60, };  int QTime::second() const {     if (!isValid())         return -1;      return (ds() \/ 1000)%SECS_PER_MIN; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 [0..59] \u0438\u043b\u0438 \u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u0448\u0438\u0431\u043a\u0438 -1.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static qint64 qt_mktime(QDate *date, QTime *time, ....) {   ....   } else if (yy == 1969 &amp;&amp; mm == 12 &amp;&amp; dd == 31              &amp;&amp; time-&gt;second() == MSECS_PER_DAY - 1) {       \/\/ There was, of course, a last second in 1969, at time_t(-1); we won't       \/\/ rescue it if it's not in normalised form, and we don't know its DST       \/\/ status (unless we did already), but let's not wantonly declare it       \/\/ invalid.   } else {   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V560 [CWE-570] A part of conditional expression is always false: time-&gt;second() == MSECS_PER_DAY \u2014 1. qdatetime.cpp 2488<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044e, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c. \u041e\u0434\u043d\u0430\u043a\u043e, \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u0436\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f else-\u0432\u0435\u0442\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u041e\u0448\u0438\u0431\u043e\u0447\u043d\u043e \u0432\u043e\u0442 \u044d\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">time-&gt;second() == MSECS_PER_DAY - 1<\/code><\/pre>\n<p>  <\/p>\n<p>MSECS_PER_DAY \u2014 1 \u044d\u0442\u043e 86399999. \u0424\u0443\u043d\u043a\u0446\u0438\u044f <em>second,<\/em> \u043a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u043c, \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0437\u0434\u0435\u0441\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0438 \u043a\u043e\u0434 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0421\u0438\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0432\u0441\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044e\u043d\u0438\u0442-\u0442\u0435\u0441\u0442\u044b \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"opechatki\">\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438<\/h2>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N3: \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e, \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u2026 HTML!<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">QString QPixelTool::aboutText() const {   const QList&lt;QScreen *&gt; screens = QGuiApplication::screens();   const QScreen *windowScreen = windowHandle()-&gt;screen();    QString result;   QTextStream str(&amp;result);   str &lt;&lt; &quot;&lt;html&gt;&lt;\/head&gt;&lt;body&gt;&lt;h2&gt;Qt Pixeltool&lt;\/h2&gt;&lt;p&gt;Qt &quot; &lt;&lt; QT_VERSION_STR     &lt;&lt; &quot;&lt;\/p&gt;&lt;p&gt;Copyright (C) 2017 The Qt Company Ltd.&lt;\/p&gt;&lt;h3&gt;Screens&lt;\/h3&gt;&lt;ul&gt;&quot;;   for (const QScreen *screen : screens)     str &lt;&lt; &quot;&lt;li&gt;&quot; &lt;&lt; (screen == windowScreen ? &quot;* &quot; : &quot;  &quot;)         &lt;&lt; screen &lt;&lt; &quot;&lt;\/li&gt;&quot;;   str &lt;&lt; &quot;&lt;ul&gt;&lt;\/body&gt;&lt;\/html&gt;&quot;;   return result; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V735 Possibly an incorrect HTML. The &quot;&lt;\/ body&gt;&quot; closing tag was encountered, while the &quot;&lt;\/ ul&gt;&quot; tag was expected. qpixeltool.cpp 707<\/p>\n<p>  <\/p>\n<p>\u0412 PVS-Studio \u0435\u0441\u0442\u044c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442 \u0441\u0430\u043c \u043a\u043e\u0434, \u043d\u043e \u0438 \u0432\u044b\u0438\u0441\u043a\u0438\u0432\u0430\u044e\u0442 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430\u0445. \u0417\u0434\u0435\u0441\u044c \u043a\u0430\u043a \u0440\u0430\u0437 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a. \u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0435\u0434\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u0437\u0430\u0442\u043e \u044d\u0442\u0438\u043c \u043e\u043d \u0438 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439.<\/p>\n<p>  <\/p>\n<p>\u0414\u0432\u0430\u0436\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u0433 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430. \u042d\u0442\u043e \u044f\u0432\u043d\u0430\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430. \u041f\u0435\u0440\u0432\u044b\u0439 \u0442\u0435\u0433, \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u2013 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">str &lt;&lt; &quot;&lt;\/ul&gt;&lt;\/body&gt;&lt;\/html&gt;&quot;;<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N4: \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">class Node {   ....   bool isGroup() const { return m_nodeType == Group; }   .... };  void DocBookGenerator::generateDocBookSynopsis(const Node *node) {   ....   if (node-&gt;isGroup() || node-&gt;isGroup()       || node-&gt;isSharedCommentNode() || node-&gt;isModule()       || node-&gt;isJsModule() || node-&gt;isQmlModule() || node-&gt;isPageNode())     return;   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V501 [CWE-570] There are identical sub-expressions to the left and to the right of the &#8216;||&#8217; operator: node-&gt;isGroup() || node-&gt;isGroup() docbookgenerator.cpp 2599<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430, \u043d\u043e \u0435\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0435\u0433\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0445\u043e\u0442\u0435\u043b\u0438 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0435\u0451 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u041d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439: \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u043d\u0443\u0436\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N5: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043b\u0438\u0448\u043d\u0435\u0439 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void MainWindow::addToPhraseBook() {   ....   QString selectedPhraseBook;   if (phraseBookList.size() == 1) {     selectedPhraseBook = phraseBookList.at(0);     if (QMessageBox::information(this, tr(&quot;Add to phrase book&quot;),           tr(&quot;Adding entry to phrasebook %1&quot;).arg(selectedPhraseBook),            QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok)                           != QMessageBox::Ok)       return;   } else {     bool okPressed = false;     QString selectedPhraseBook =        QInputDialog::getItem(this, tr(&quot;Add to phrase book&quot;),                             tr(&quot;Select phrase book to add to&quot;),                             phraseBookList, 0, false, &amp;okPressed);     if (!okPressed)       return;   }    MessageItem *currentMessage = m_dataModel-&gt;messageItem(m_currentIndex);   Phrase *phrase = new Phrase(currentMessage-&gt;text(),                               currentMessage-&gt;translation(),                               QString(), nullptr);    phraseBookHash.value(selectedPhraseBook)-&gt;append(phrase); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443. \u0410 \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u0441\u0440\u0430\u0437\u0443 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043d\u0435 \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u043e\u0442\u0432\u0435\u0442, \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0441\u044e\u0434\u0430 \u0435\u0434\u0438\u043d\u043e\u0440\u043e\u0436\u043a\u0443 \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0434\u0430\u0436\u0435 \u0435\u0433\u043e \u0435\u0449\u0451 \u043d\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 :).<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/w1\/ft\/p1\/w1ftp1jvnp8cbzjeabn92p28h3u.png\" alt=\"\u0415\u0434\u0438\u043d\u043e\u0440\u043e\u0433 \u0438\u0437 \u0441\u0442\u0430\u0440\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V561 [CWE-563] It&#8217;s probably better to assign value to &#8216;selectedPhraseBook&#8217; variable than to declare it anew. Previous declaration: mainwindow.cpp, line 1303. mainwindow.cpp 1313<\/p>\n<p>  <\/p>\n<p>\u0412 \u043e\u0431\u043e\u0438\u0445 \u0432\u0435\u0442\u043a\u0430\u0445 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>selectedPhraseBook<\/em>. \u0418\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u043d\u043e\u0435, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u0431\u044b\u043b\u043e \u043b\u0435\u043d\u044c \u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e \u0437\u0430\u043d\u043e\u0432\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0442\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u043e\u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u043d \u0447\u0443\u0442\u044c \u043f\u043e\u0441\u043f\u0435\u0448\u0438\u043b \u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b \u0438 \u0442\u0438\u043f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">QString selectedPhraseBook =<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432 else-\u0431\u043b\u043e\u043a\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u0422\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u0431\u043b\u043e\u043a\u0435 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N6: \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/strong><\/p>\n<p>  <\/p>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 <a href=\"https:\/\/www.viva64.com\/ru\/examples\/v593\/\">\u0447\u0430\u0441\u0442\u043e<\/a>.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool QQmlImportInstance::resolveType(....) {   ....   if (int icID = containingType.lookupInlineComponentIdByName(typeStr) != -1)   {     *type_return = containingType.lookupInlineComponentById(icID);   } else {     auto icType = createICType();     ....   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V593 [CWE-783] Consider reviewing the expression of the &#8216;A = B != C&#8217; kind. The expression is calculated as following: &#8216;A = (B != C)&#8217;. qqmlimport.cpp 754<\/p>\n<p>  <\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>icID<\/em> \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0 \u0438\u043b\u0438 1. \u042d\u0442\u043e \u044f\u0432\u043d\u043e \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u043e\u0441\u044c. \u041f\u0440\u0438\u0447\u0438\u043d\u0430: \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 -1, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0442\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>icID<\/em>.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 C++ \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (int icID = containingType.lookupInlineComponentIdByName(typeStr);     icID != -1)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043c\u044b \u0443\u0436\u0435 <a href=\"https:\/\/www.viva64.com\/ru\/b\/0251\/\">\u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u043b\u0438<\/a> \u0432 Qt:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">char ch; while (i &lt; dataLen &amp;&amp; ((ch = data.at(i) != '\\n') &amp;&amp; ch != '\\r'))   ++i;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u043f\u043e\u043a\u0430 \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u044f\u0442 \u0442\u0430\u043a\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430, \u043a\u0430\u043a PVS-Studio, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0432\u043d\u043e\u0432\u044c \u0438 \u0432\u043d\u043e\u0432\u044c \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0435\u043d. \u0418 \u0434\u0430, \u044d\u0442\u043e \u0442\u043e\u043d\u043a\u0438\u0439 \u043d\u0430\u043c\u0451\u043a \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c PVS-Studio :).<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N7: \u043a\u043e\u0432\u0430\u0440\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e<\/strong><\/p>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u043d\u0430 2 \u0438\u043b\u0438 \u043d\u0435\u0442. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u044d\u0442\u043e \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u0434\u0432\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (A % 2 == 1)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0432\u043d\u043e\u0432\u044c \u0438 \u0432\u043d\u043e\u0432\u044c \u043e\u0448\u0438\u0431\u0430\u044e\u0442\u0441\u044f \u0438 \u043f\u0438\u0448\u0443\u0442 \u0447\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 \u044d\u0442\u043e\u0433\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (A % 1 == 1)<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043e\u0442 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u043c\u043e\u0434\u0443\u043b\u044e \u043d\u0430 \u043e\u0434\u0438\u043d \u2013 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u043e\u043b\u044c. \u041d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e\u0441\u044c \u0431\u0435\u0437 \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0432 Qt:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool loadQM(Translator &amp;translator, QIODevice &amp;dev, ConversionData &amp;cd) {   ....   case Tag_Translation: {     int len = read32(m);     if (len % 1) {                                             \/\/ &lt;=       cd.appendError(QLatin1String(&quot;QM-Format error&quot;));       return false;     }     m += 4;     QString str = QString((const QChar *)m, len\/2);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V1063 The modulo by 1 operation is meaningless. The result will always be zero. qm.cpp 549<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N8: \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">QString Node::qualifyQmlName() {   QString qualifiedName = m_name;   if (m_name.startsWith(QLatin1String(&quot;QML:&quot;)))     qualifiedName = m_name.mid(4);   qualifiedName = logicalModuleName() + &quot;::&quot; + m_name;   return qualifiedName; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V519 [CWE-563] The &#8216;qualifiedName&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1227, 1228. node.cpp 1228<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0435 \u0442\u043e \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0437\u0434\u0435\u0441\u044c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">QString qualifiedName = m_name; if (m_name.startsWith(QLatin1String(&quot;QML:&quot;)))   qualifiedName = m_name.mid(4); qualifiedName = logicalModuleName() + &quot;::&quot; + qualifiedName; return qualifiedName;<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N9: copy-paste<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">class Q_CORE_EXPORT QJsonObject {   ....   bool operator&lt;(const iterator&amp; other) const   { Q_ASSERT(item.o == other.item.o); return item.index &lt; other.item.index; }   bool operator&lt;=(const iterator&amp; other) const   { Q_ASSERT(item.o == other.item.o); return item.index &lt; other.item.index; }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0443\u0434\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V524 It is odd that the body of &#8216;&lt;=&#8217; function is fully equivalent to the body of &#8216;&lt;&#8216; function. qjsonobject.h 155<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u0435 \u0441\u043a\u0443\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u0430\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442. \u041d\u0430 \u043d\u0438\u0445 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435 \u043f\u0438\u0448\u0443\u0442 \u0442\u0435\u0441\u0442\u044b. \u0418\u0445 \u043d\u0435 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442 \u0438\u043b\u0438 \u0434\u0435\u043b\u0430\u044e\u0442 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430 code review. \u0410 <a href=\"https:\/\/www.viva64.com\/ru\/b\/0509\/\">\u0437\u0440\u044f<\/a>. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u0434\u0430 \u0437\u0434\u0435\u0441\u044c \u043a\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f \u043a\u0441\u0442\u0430\u0442\u0438. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u0443\u0441\u0442\u0430\u0451\u0442 \u0438 \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u0430\u0436\u0435 \u0442\u0430\u043a\u043e\u0439 \u0441\u043a\u0443\u0447\u043d\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 &lt; \u0438 &lt;= \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442. \u042d\u0442\u043e \u044f\u0432\u043d\u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043a\u043e\u0434 \u043f\u0438\u0441\u0430\u043b\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c Copy-Paste, \u0438 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0432 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool operator&lt;(const iterator&amp; other) const { Q_ASSERT(item.o == other.item.o); return item.index &lt; other.item.index; } bool operator&lt;=(const iterator&amp; other) const { Q_ASSERT(item.o == other.item.o); return item.index &lt;= other.item.index; }<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N10: static_cast \/ dynamic_cast<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void QSGSoftwareRenderThread::syncAndRender() {   ....   bool canRender = wd-&gt;renderer != nullptr;    if (canRender) {      auto softwareRenderer = static_cast&lt;QSGSoftwareRenderer*&gt;(wd-&gt;renderer);      if (softwareRenderer)        softwareRenderer-&gt;setBackingStore(backingStore);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-571] Expression &#8216;softwareRenderer&#8217; is always true. qsgsoftwarethreadedrenderloop.cpp 510<\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u043e\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool canRender = wd-&gt;renderer != nullptr; if (canRender) {<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043b\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <em>wd-&gt;renderer<\/em> \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u043e\u0447\u043d\u043e \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0435. \u0422\u043e\u0433\u0434\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0436\u0435 \u0445\u043e\u0442\u044f\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c?<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">auto softwareRenderer = static_cast&lt;QSGSoftwareRenderer*&gt;(wd-&gt;renderer); if (softwareRenderer)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>wd-&gt;renderer<\/em> \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439, \u0442\u043e \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>softwareRenderer<\/em> \u0442\u043e\u0447\u043d\u043e \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439. \u0415\u0441\u0442\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>dynamic_cast<\/em>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0434 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0441\u043c\u044b\u0441\u043b. \u0415\u0441\u043b\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <em>dynamic_cast<\/em> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <em>nullptr,<\/em> \u0438 \u044d\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0438 \u043a\u043e\u0434 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N11: \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430 \u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void *QQuickPath::qt_metacast(const char *_clname) {   if (!_clname) return nullptr;   if (!strcmp(_clname, qt_meta_stringdata_QQuickPath.stringdata0))     return static_cast&lt;void*&gt;(this);   if (!strcmp(_clname, &quot;QQmlParserStatus&quot;))     return static_cast&lt; QQmlParserStatus*&gt;(this);   if (!strcmp(_clname, &quot;org.qt-project.Qt.QQmlParserStatus&quot;))   \/\/ &lt;=     return static_cast&lt; QQmlParserStatus*&gt;(this);   if (!strcmp(_clname, &quot;org.qt-project.Qt.QQmlParserStatus&quot;))   \/\/ &lt;=     return static_cast&lt; QQmlParserStatus*&gt;(this);   return QObject::qt_metacast(_clname); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V581 [CWE-670] The conditional expressions of the &#8216;if&#8217; statements situated alongside each other are identical. Check lines: 2719, 2721. moc_qquickpath_p.cpp 2721<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0438 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (!strcmp(_clname, &quot;org.qt-project.Qt.QQmlParserStatus&quot;))   return static_cast&lt; QQmlParserStatus*&gt;(this);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u044b\u043b\u0438 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Copy-Paste. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u043d\u0438 \u043d\u0435 \u0431\u044b\u043b\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N12: \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438\u0437-\u0437\u0430 \u043d\u0435 \u0442\u0430\u043c \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u043a\u043e\u0431\u043a\u0438<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">int m_offsetFromUtc; .... void QDateTime::setMSecsSinceEpoch(qint64 msecs) {   ....   if (!add_overflow(msecs, qint64(d-&gt;m_offsetFromUtc * 1000), &amp;msecs))     status |= QDateTimePrivate::ValidWhenMask;   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V1028 [CWE-190] Possible overflow. Consider casting operands of the &#8216;d-&gt;m_offsetFromUtc * 1000&#8217; operator to the &#8216;qint64&#8217; type, not the result. qdatetime.cpp 3922<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0438\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 <em>int<\/em> \u043d\u0430 <em>1000<\/em> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u043e\u043d \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0438 64-\u0431\u0438\u0442\u043d\u044b\u0439 \u0442\u0438\u043f <em>qint64<\/em>. \u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044f\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u043b\u043a\u0443 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. \u0418 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">add_overflow(msecs, qint64(d-&gt;m_offsetFromUtc) * 1000, &amp;msecs)<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N13: \u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">class QPathEdge {   .... private:   int m_next[2][2];   .... };  inline QPathEdge::QPathEdge(int a, int b)     : flag(0)     , windingA(0)     , windingB(0)     , first(a)     , second(b)     , angle(0)     , invAngle(0) {     m_next[0][0] = -1;     m_next[1][0] = -1;     m_next[0][0] = -1;     m_next[1][0] = -1; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f PVS-Studio: <\/p>\n<p>  <\/p>\n<ul>\n<li>V1048 [CWE-1164] The &#8216;m_next[0][0]&#8217; variable was assigned the same value. qpathclipper_p.h 301<\/li>\n<li>V1048 [CWE-1164] The &#8216;m_next[1][0]&#8217; variable was assigned the same value. qpathclipper_p.h 302<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 2&#215;2. \u0414\u0432\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e, \u0438 \u0434\u0432\u0430 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">m_next[0][0] = -1; m_next[0][1] = -1; m_next[1][0] = -1; m_next[1][1] = -1;<\/code><\/pre>\n<p>  <\/p>\n<p>\u042f \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u043b\u044e \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c\u0441\u044f, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0448\u0438\u043c \u0434\u0440\u0443\u0433\u043e\u043c. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044f \u0443\u0436\u0435 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u043b\u0435\u0442 \u0432\u0435\u0434\u0443 \u0431\u043e\u0439 \u0441\u043e \u0441\u043a\u0435\u043f\u0442\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0445 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432 \u0438 \u0447\u0442\u043e \u043e\u043d\u0438 \u0442\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 :). \u0415\u0449\u0451 10 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0437\u0430\u043c\u0435\u0442\u043a\u0443 &quot;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0116\/\">\u041c\u0438\u0444 \u0432\u0442\u043e\u0440\u043e\u0439 \u2013 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u0433\u043b\u0443\u043f\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a<\/a>&quot;, \u0438 \u0441 \u0442\u0435\u0445 \u043f\u043e\u0440, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c. \u041b\u044e\u0434\u0438 \u0432\u0441\u0451 \u0442\u0430\u043a\u0436\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0432\u0441\u0451 \u0442\u0430\u043a\u0436\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a :).<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_7\/se\/se\/_7seseccfbphq54sdxbuaihaywy.png\" alt=\"\u0411\u0443\u0434\u044c \u043c\u0443\u0434\u0440 - \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430\"><\/p>\n<p>  <\/p>\n<h2 id=\"oshibki-v-logike\">\u041e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043b\u043e\u0433\u0438\u043a\u0435<\/h2>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N14: \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0439 \u043a\u043e\u0434<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void QmlProfilerApplication::tryToConnect() {   Q_ASSERT(!m_connection-&gt;isConnected());   ++ m_connectionAttempts;    if (!m_verbose &amp;&amp; !(m_connectionAttempts % 5)) {\/\/ print every 5 seconds     if (m_verbose) {       if (m_socketFile.isEmpty())         logError(           QString::fromLatin1(&quot;Could not connect to %1:%2 for %3 seconds ...&quot;)           .arg(m_hostName).arg(m_port).arg(m_connectionAttempts));       else         logError(           QString::fromLatin1(&quot;No connection received on %1 for %2 seconds ...&quot;)           .arg(m_socketFile).arg(m_connectionAttempts));     }   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-570] Expression &#8216;m_verbose&#8217; is always false. qmlprofilerapplication.cpp 495<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u0438\u0448\u0435\u0442 \u0432 \u043b\u043e\u0433. \u041f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (!m_verbose &amp;&amp; ....) {   if (m_verbose) {<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N15: \u043f\u0435\u0440\u0435\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void QRollEffect::scroll() {   ....   if (currentHeight != totalHeight) {       currentHeight = totalHeight * (elapsed\/duration)           + (2 * totalHeight * (elapsed%duration) + duration)           \/ (2 * duration);       \/\/ equiv. to int((totalHeight*elapsed) \/ duration + 0.5)       done = (currentHeight &gt;= totalHeight);   }   done = (currentHeight &gt;= totalHeight) &amp;&amp;          (currentWidth &gt;= totalWidth);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V519 [CWE-563] The &#8216;done&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 509, 511. qeffects.cpp 511<\/p>\n<p>  <\/p>\n<p>\u0412\u0435\u0441\u044c \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>done<\/em> \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0442\u0443\u0442 \u0436\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <em>else<\/em>.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N16-N20: \u043f\u0435\u0440\u0435\u0442\u0438\u0440\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439<\/strong><\/p>\n<p>  <\/p>\n<p>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0435\u0440\u0435\u0442\u0438\u0440\u0430\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. <\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool QXmlStreamWriterPrivate::finishStartElement(bool contents) {   ....   if (inEmptyElement) {     ....     lastNamespaceDeclaration = tag.namespaceDeclarationsSize;   \/\/ &lt;=     lastWasStartElement = false;   } else {     write(&quot;&gt;&quot;);   }   inStartElement = inEmptyElement = false;   lastNamespaceDeclaration = namespaceDeclarations.size();      \/\/ &lt;=   return hadSomethingWritten; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V519 [CWE-563] The &#8216;lastNamespaceDeclaration&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3030, 3036. qxmlstream.cpp 3036<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0435\u0440\u0432\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>lastNamespaceDeclaration<\/em> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u043d\u0435\u0439 \u0438 \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c. \u0410 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0435\u0449\u0451 4 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>V519 [CWE-563] The &#8216;last&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 609, 637. qtextengine.cpp 637<\/li>\n<li>V519 [CWE-563] The &#8216;m_dirty&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1014, 1017. qquickshadereffect.cpp 1017<\/li>\n<li>V519 [CWE-563] The &#8216;changed&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 122, 128. qsgdefaultspritenode.cpp 128<\/li>\n<li>V519 [CWE-563] The &#8216;eaten&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 299, 301. qdesigner.cpp 301<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N21: \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043d\u0443\u043b\u0435\u0432\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u0438 \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\/\/ this could become a list of all languages used for each writing \/\/ system, instead of using the single most common language. static const char languageForWritingSystem[][6] = {     &quot;&quot;,     \/\/ Any     &quot;en&quot;,  \/\/ Latin     &quot;el&quot;,  \/\/ Greek     &quot;ru&quot;,  \/\/ Cyrillic      ...... \/\/ \u041d\u0443\u043b\u0435\u0432\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0435\u0442. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b.      &quot;&quot;, \/\/ Symbol     &quot;sga&quot;, \/\/ Ogham     &quot;non&quot;, \/\/ Runic     &quot;man&quot; \/\/ N'Ko };  static void populateFromPattern(....) {   ....   for (int j = 1; j &lt; QFontDatabase::WritingSystemsCount; ++j) {     const FcChar8 *lang = (const FcChar8*) languageForWritingSystem[j];     if (lang) {   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-571] Expression &#8216;lang&#8217; is always true. qfontconfigdatabase.cpp 462<\/p>\n<p>  <\/p>\n<p>\u0412 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 <em>languageForWritingSystem<\/em> \u043d\u0435\u0442 \u043d\u0443\u043b\u0435\u0432\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <em>if(lang)<\/em> \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u0417\u0430\u0442\u043e \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0435\u0441\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u0411\u044b\u0442\u044c \u043c\u043e\u0436\u0435\u0442, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443? \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e\u0433\u0434\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (strlen(lang) != 0) {<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0451 \u043f\u0440\u043e\u0449\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (lang[0] != '\\0') {<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N22: \u0441\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool QNativeSocketEnginePrivate::createNewSocket(....) {   ....   int socket = qt_safe_socket(domain, type, protocol, O_NONBLOCK);   ....   if (socket &lt; 0) {     ....     return false;   }    socketDescriptor = socket;    if (socket != -1) {     this-&gt;socketProtocol = socketProtocol;     this-&gt;socketType = socketType;   }   return true; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-571] Expression &#8216;socket != \u2014 1&#8217; is always true. qnativesocketengine_unix.cpp 315<\/p>\n<p>  <\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435 <em>socket != -1<\/em> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>socket<\/em> \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N23: \u0442\u0430\u043a \u0447\u0442\u043e \u0436\u0435 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f?<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool QSqlTableModel::removeRows(int row, int count, const QModelIndex &amp;parent) {   Q_D(QSqlTableModel);   if (parent.isValid() || row &lt; 0 || count &lt;= 0)     return false;   else if (row + count &gt; rowCount())     return false;   else if (!count)     return true;   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-570] Expression &#8216;!count&#8217; is always false. qsqltablemodel.cpp 1110<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u044e \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (.... || count &lt;= 0)   return false; .... else if (!count)   return true;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>count<\/em> \u043c\u0435\u043d\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e 0, \u0442\u043e \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c <em>false<\/em>. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0438\u0436\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0442\u043e\u0447\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u043d\u0443\u043b\u0451\u043c, \u0438 \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443: \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c <em>true<\/em>.<\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u044f\u0432\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u042f \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u044e, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043d\u0435 &lt;=, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e &lt;. \u0422\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0441\u043c\u044b\u0441\u043b:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool QSqlTableModel::removeRows(int row, int count, const QModelIndex &amp;parent) {   Q_D(QSqlTableModel);   if (parent.isValid() || row &lt; 0 || count &lt; 0)     return false;   else if (row + count &gt; rowCount())     return false;   else if (!count)     return true;   .... }<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N24: \u043b\u0438\u0448\u043d\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441?<\/strong><\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043a\u043e\u0434\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>identifierWithEscapeChars<\/em> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043a \u043b\u0438\u0448\u043d\u044f\u044f \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c. \u0418\u043b\u0438 \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430? \u0418\u043b\u0438 \u043a\u043e\u0434 \u043d\u0435 \u0434\u043e\u043f\u0438\u0441\u0430\u043d? \u041a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u0430 <em>true<\/em>.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">int Lexer::scanToken() {   ....   bool identifierWithEscapeChars = false;   ....   if (!identifierWithEscapeChars) {     identifierWithEscapeChars = true;     ....   }   ....   if (identifierWithEscapeChars) {    \/\/ &lt;=     ....   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-571] Expression &#8216;identifierWithEscapeChars&#8217; is always true. qqmljslexer.cpp 817<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N25: \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0434\u0435\u0432\u044f\u0442\u044c\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438?<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool QFont::fromString(const QString &amp;descrip) {   ....   const int count = l.count();   if (!count || (count &gt; 2 &amp;&amp; count &lt; 9) || count == 9 || count &gt; 17 ||       l.first().isEmpty()) {     qWarning(&quot;QFont::fromString: Invalid description '%s'&quot;,              descrip.isEmpty() ? &quot;(empty)&quot; : descrip.toLatin1().data());     return false;   }    setFamily(l[0].toString());   if (count &gt; 1 &amp;&amp; l[1].toDouble() &gt; 0.0)     setPointSizeF(l[1].toDouble());   if (count == 9) {                           \/\/ &lt;=     setStyleHint((StyleHint) l[2].toInt());     setWeight(QFont::Weight(l[3].toInt()));     setItalic(l[4].toInt());     setUnderline(l[5].toInt());     setStrikeOut(l[6].toInt());     setFixedPitch(l[7].toInt());   } else if (count &gt;= 10) {   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-570] Expression &#8216;count == 9&#8217; is always false. qfont.cpp 2142<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0435\u0431\u044f \u0432\u0435\u0441\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>count<\/em> \u0440\u0430\u0432\u043d\u0430 9? \u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0434\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u0412\u0435\u0434\u044c \u044f\u0432\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (.... || count == 9 || ....) {   qWarning(....);   return false; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0434\u043b\u044f 9 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (count == 9) {   setStyleHint((StyleHint) l[2].toInt());   setWeight(QFont::Weight(l[3].toInt()));   setItalic(l[4].toInt());   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f. \u041a\u043e\u0434 \u0436\u0434\u0451\u0442, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043f\u0440\u0438\u0448\u043b\u0438 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 :).<\/p>\n<p>  <\/p>\n<h2 id=\"nulevye-ukazateli\">\u041d\u0443\u043b\u0435\u0432\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438<\/h2>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N26-N42: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0434\u043e \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">class __attribute__((visibility(&quot;default&quot;))) QMetaType {   ....   const QtPrivate::QMetaTypeInterface *d_ptr = nullptr; };  QPartialOrdering QMetaType::compare(const void *lhs, const void *rhs) const {     if (!lhs || !rhs)         return QPartialOrdering::Unordered;     if (d_ptr-&gt;flags &amp; QMetaType::IsPointer)         return threeWayCompare(*reinterpret_cast&lt;const void * const *&gt;(lhs),                                *reinterpret_cast&lt;const void * const *&gt;(rhs));     if (d_ptr &amp;&amp; d_ptr-&gt;lessThan) {         if (d_ptr-&gt;equals &amp;&amp; d_ptr-&gt;equals(d_ptr, lhs, rhs))             return QPartialOrdering::Equivalent;         if (d_ptr-&gt;lessThan(d_ptr, lhs, rhs))             return QPartialOrdering::Less;         if (d_ptr-&gt;lessThan(d_ptr, rhs, lhs))             return QPartialOrdering::Greater;         if (!d_ptr-&gt;equals)             return QPartialOrdering::Equivalent;     }     return QPartialOrdering::Unordered; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V595 [CWE-476] The &#8216;d_ptr&#8217; pointer was utilized before it was verified against nullptr. Check lines: 710, 713. qmetatype.cpp 710<\/p>\n<p>  <\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u0430. \u041d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e. \u041f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u043c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c <em>d_ptr<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (d_ptr-&gt;flags &amp; ....) if (d_ptr &amp;&amp; ....)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0418 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439. <\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u044f\u0437\u044b\u043a\u0435 C \u0438 \u0421++. <a href=\"https:\/\/www.viva64.com\/ru\/examples\/v595\/\">\u041f\u0440\u0443\u0444\u044b<\/a>. \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 Qt \u043a\u043e\u0434\u0430\u0445 \u0442\u043e\u0436\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u0430\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u044d\u0442\u043e\u0439 \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li>V595 [CWE-476] The &#8216;self&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1346, 1351. qcoreapplication.cpp 1346<\/li>\n<li>V595 [CWE-476] The &#8216;currentTimerInfo&#8217; pointer was utilized before it was verified against nullptr. Check lines: 636, 641. qtimerinfo_unix.cpp 636<\/li>\n<li>V595 [CWE-476] The &#8216;lib&#8217; pointer was utilized before it was verified against nullptr. Check lines: 325, 333. qlibrary.cpp 325<\/li>\n<li>V595 [CWE-476] The &#8216;fragment.d&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2262, 2266. qtextcursor.cpp 2262<\/li>\n<li>V595 [CWE-476] The &#8216;window&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1581, 1583. qapplication.cpp 1581<\/li>\n<li>V595 [CWE-476] The &#8216;window&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1593, 1595. qapplication.cpp 1593<\/li>\n<li>V595 [CWE-476] The &#8216;newHandle&#8217; pointer was utilized before it was verified against nullptr. Check lines: 873, 879. qsplitter.cpp 873<\/li>\n<li>V595 [CWE-476] The &#8216;targetModel&#8217; pointer was utilized before it was verified against nullptr. Check lines: 454, 455. qqmllistmodel.cpp 454<\/li>\n<li>V595 [CWE-476] The &#8216;childIface&#8217; pointer was utilized before it was verified against nullptr. Check lines: 102, 104. qaccessiblequickitem.cpp 102<\/li>\n<li>V595 [CWE-476] The &#8216;e&#8217; pointer was utilized before it was verified against nullptr. Check lines: 94, 98. qquickwindowmodule.cpp 94<\/li>\n<li>V595 [CWE-476] The &#8216;m_texture&#8217; pointer was utilized before it was verified against nullptr. Check lines: 235, 239. qsgplaintexture.cpp 235<\/li>\n<li>V595 [CWE-476] The &#8216;m_unreferencedPixmaps&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1140, 1148. qquickpixmapcache.cpp 1140<\/li>\n<li>V595 [CWE-476] The &#8216;camera&#8217; pointer was utilized before it was verified against nullptr. Check lines: 263, 264. assimpimporter.cpp 263<\/li>\n<li>V595 [CWE-476] The &#8216;light&#8217; pointer was utilized before it was verified against nullptr. Check lines: 273, 274. assimpimporter.cpp 273<\/li>\n<li>V595 [CWE-476] The &#8216;channel&#8217; pointer was utilized before it was verified against nullptr. Check lines: 337, 338. assimpimporter.cpp 337<\/li>\n<li>V595 [CWE-476] The &#8216;m_fwb&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2492, 2500. designerpropertymanager.cpp 2492<\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N43: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0434\u043e \u0435\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/strong><\/p>\n<p>  <\/p>\n<p>\u0422\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0447\u0442\u043e \u0438 \u0432\u044b\u0448\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438. \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0430\u044f \u0438\u0437-\u0437\u0430 \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c code-review.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void QFormLayoutPrivate::updateSizes() {   ....   QFormLayoutItem *field = m_matrix(i, 1);   ....   if (userHSpacing &lt; 0 &amp;&amp; !wrapAllRows &amp;&amp; (label || !field-&gt;fullRow) &amp;&amp; field)   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V713 [CWE-476] The pointer &#8216;field&#8217; was utilized in the logical expression before it was verified against nullptr in the same logical expression. qformlayout.cpp 405<\/p>\n<p>  <\/p>\n<p><strong>\u041c\u0438\u043d\u0443\u0442\u043a\u0430 \u043e\u0442\u0434\u044b\u0445\u0430<\/strong><\/p>\n<p>  <\/p>\n<p>\u042f \u0443\u0441\u0442\u0430\u043b. \u0414\u0443\u043c\u0430\u044e, \u0443\u0441\u0442\u0430\u043b\u0438 \u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438. \u0422\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u0435\u0448\u044c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0435\u0433\u043b\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0441\u0442\u0430\u0442\u044c\u0438 :). \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u0448\u0451\u043b \u0437\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0448\u0435\u0447\u043a\u043e\u0439 \u043a\u043e\u0444\u0435. \u041f\u0435\u0440\u0432\u0443\u044e \u044f \u0432\u044b\u043f\u0438\u043b \u0433\u0434\u0435-\u0442\u043e \u043d\u0430 \u0440\u0443\u0431\u0435\u0436\u0435 12-\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0438 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430 \u043b\u044e\u0431\u0438\u043c\u044b\u043c \u043d\u0430\u043f\u0438\u0442\u043a\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u0418 \u043f\u043e\u043a\u0430 \u0432\u0441\u0435 \u0443\u0448\u043b\u0438 \u043d\u0430 \u043a\u0443\u0445\u043d\u044e, \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u0430\u044f \u043f\u0430\u0443\u0437\u0430. \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Qt \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u044f \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438 \u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 PVS-Studio. \u0417\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u0430\u0439\u0441 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.viva64.com\/ru\/order\/\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0421 \u043d\u0430\u0448\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u2013 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438 \u043f\u043e\u043c\u043e\u0449\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435. \u0414\u0430, \u0441\u043e\u0433\u043b\u0430\u0441\u0435\u043d, \u044f \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0432\u044f\u0437\u0447\u0438\u0432, \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u043e. \u042d\u0442\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 :).<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3d\/ax\/oi\/3daxoirjj4hbr1uiluck146qd-y.png\" alt=\"\u041c\u0438\u043d\u0443\u0442\u043a\u0430 \u043e\u0442\u0434\u044b\u0445\u0430 \u0441 \u0435\u0434\u0438\u043d\u043e\u0440\u043e\u0433\u043e\u043c\"><\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N44-N72: \u043d\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0447\u0442\u043e \u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f malloc<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void assignData(const QQmlProfilerEvent &amp;other) {   if (m_dataType &amp; External) {     uint length = m_dataLength * (other.m_dataType \/ 8);     m_data.external = malloc(length);                          \/\/ &lt;=     memcpy(m_data.external, other.m_data.external, length);    \/\/ &lt;=   } else {     memcpy(&amp;m_data, &amp;other.m_data, sizeof(m_data));   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V575 [CWE-628] The potential null pointer is passed into &#8216;memcpy&#8217; function. Inspect the first argument. Check lines: 277, 276. qqmlprofilerevent_p.h 277<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>malloc<\/em>. \u041d\u0443\u0436\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u044d\u0442\u043e\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u043d\u044c \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c 4 \u043f\u0440\u0438\u0447\u0438\u043d\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &quot;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0558\/\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f malloc<\/a>&quot;.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0433\u0434\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430. \u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u043d\u043e \u0438\u0437-\u0437\u0430 \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432 \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u044f \u0432\u044b\u043f\u0438\u0441\u0430\u043b 28 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b: <a href=\"http:\/\/cppfiles.com\/qt6-malloc.txt\">qt6-malloc.txt<\/a>. \u041d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0441\u0430\u043c\u0438\u043c \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u0423 \u043c\u0435\u043d\u044f \u043d\u0435 \u0431\u044b\u043b\u043e \u0437\u0430\u0434\u0430\u0447\u0438 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043d\u0430 \u0444\u043e\u043d\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u0437\u0430\u0431\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0435\u0441\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0435. \u0420\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0432\u044b\u0437\u043e\u0432\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 new, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <em>std::bad_alloc<\/em>. \u0412\u043e\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0442\u0430\u043a\u043e\u0439 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static QImageScaleInfo* QImageScale::qimageCalcScaleInfo(....) {   ....   QImageScaleInfo *isi;   ....   isi = new QImageScaleInfo;   if (!isi)     return nullptr;   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V668 [CWE-570] There is no sense in testing the &#8216;isi&#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. qimagescale.cpp 245<\/p>\n<p>  <\/p>\n<p>P.S. \u0417\u0434\u0435\u0441\u044c \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u044e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 placement new \u0438\u043b\u0438 &quot;new (std::nothrow) T&quot;? \u0414\u0430, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0438 \u043d\u0435 \u0432\u044b\u0434\u0430\u0451\u0442 \u0434\u043b\u044f \u043d\u0438\u0445 \u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"izbytochnyy-kod-kod-s-zapahom\">\u0418\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u0434 (&quot;\u043a\u043e\u0434 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c&quot;)<\/h2>\n<p>  <\/p>\n<p>\u0412\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u0430\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\u044f \u043d\u0430 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c, \u043d\u043e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0430\u0436\u0435 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043b\u043e\u0436\u043d\u043e\u0435 \u044d\u0442\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0430\u0432, \u043d\u043e \u0438 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u043e\u043d \u043d\u0435 \u043d\u0430\u0448\u0451\u043b.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e &quot;\u043a\u043e\u0434 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c&quot;. \u0420\u0430\u0437 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u043c\u0443\u0449\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043c\u0443\u0449\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432, \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/p>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Qt \u0432\u0434\u0440\u0443\u0433 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e. \u042f\u0432\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0443\u0434\u0435\u043b\u0438\u0442\u044c \u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u0414\u0443\u043c\u0430\u044e, \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u044d\u0442\u0438\u0445 \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0445 \u043c\u0435\u0441\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043e\u0442\u0447\u0451\u0442, \u043d\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u044f \u0432\u044b\u043f\u0438\u0448\u0443 \u0432 \u0441\u0442\u0430\u0442\u044c\u044e.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N73: &quot;\u043a\u043e\u0434 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c&quot; \u2014 \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">void QQuick3DSceneManager::setWindow(QQuickWindow *window) {   if (window == m_window)     return;    if (window != m_window) {     if (m_window)       disconnect(....);     m_window = window;     connect(....);     emit windowChanged();   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-571] Expression &#8216;window != m_window&#8217; is always true. qquick3dscenemanager.cpp 60<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 <em>window==m_window<\/em>, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443. \u041f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0430\u0435\u0442 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N74: &quot;\u043a\u043e\u0434 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c&quot; \u2013 \u0441\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">QModelIndex QTreeView::moveCursor(....) {   ....   int vi = -1;   if (vi &lt; 0)     vi = qMax(0, d-&gt;viewIndex(current));   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Stduio: V547 [CWE-571] Expression &#8216;vi &lt; 0&#8217; is always true. qtreeview.cpp 2219<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/aa\/w_\/gf\/aaw_gfpc6lmox5luucvqsozmlho.png\" alt=\"\u0427\u0442\u043e \u044d\u0442\u043e? \u0417\u0430\u0447\u0435\u043c \u0442\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c?\"><\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u044d\u0442\u043e? \u0417\u0430\u0447\u0435\u043c \u0442\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c? \u041a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0434\u043e \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">int vi = qMax(0, d-&gt;viewIndex(current));<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N75: &quot;\u043a\u043e\u0434 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c&quot; \u2013 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u044b\u0439 \u043a\u043e\u0434<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool copyQtFiles(Options *options) {   ....   if (unmetDependencies.isEmpty()) {     if (options-&gt;verbose) {       fprintf(stdout, &quot;  -- Skipping %s, architecture mismatch.\\n&quot;,               qPrintable(sourceFileName));     }   } else {     if (unmetDependencies.isEmpty()) {       if (options-&gt;verbose) {         fprintf(stdout, &quot;  -- Skipping %s, architecture mismatch.\\n&quot;,                   qPrintable(sourceFileName));       }     } else {       fprintf(stdout, &quot;  -- Skipping %s. It has unmet dependencies: %s.\\n&quot;,               qPrintable(sourceFileName),               qPrintable(unmetDependencies.join(QLatin1Char(','))));     }   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V571 [CWE-571] Recurring check. The &#8216;if (unmetDependencies.isEmpty())&#8217; condition was already verified in line 2203. main.cpp 2209<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0440\u0435\u0441\u043f\u0435\u043a\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0433\u043b\u044f\u0434\u0438\u043c\u0441\u044f. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <em>unmetDependencies.isEmpty()<\/em> \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u043e\u0441\u044c, \u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u044d\u0442\u043e\u0433\u043e \u0443\u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442. \u042d\u0442\u043e \u043d\u0435\u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u0440 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442, \u043d\u043e \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u0443\u0441\u043b\u043e\u0436\u043d\u0451\u043d. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043f\u0440\u043e\u0449\u0435\u043d \u0434\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool copyQtFiles(Options *options) {   ....   if (unmetDependencies.isEmpty()) {     if (options-&gt;verbose) {       fprintf(stdout, &quot;  -- Skipping %s, architecture mismatch.\\n&quot;,               qPrintable(sourceFileName));     }   } else {     fprintf(stdout, &quot;  -- Skipping %s. It has unmet dependencies: %s.\\n&quot;,             qPrintable(sourceFileName),             qPrintable(unmetDependencies.join(QLatin1Char(','))));   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N76: &quot;\u043a\u043e\u0434 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c&quot; \u2013 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0442\u0435\u0440\u043d\u0430\u0440\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool QDockAreaLayoutInfo::insertGap(....) {   ....   QDockAreaLayoutItem new_item     = widgetItem == nullptr       ? QDockAreaLayoutItem(subinfo)       : widgetItem ? QDockAreaLayoutItem(widgetItem)                     : QDockAreaLayoutItem(placeHolderItem);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-571] Expression &#8216;widgetItem&#8217; is always true. qdockarealayout.cpp 1167<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u041d\u043e \u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043a\u043b\u043e\u043d\u044f\u044e\u0441\u044c \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c (\u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c). \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">  QDockAreaLayoutItem new_item     = widgetItem == nullptr       ? QDockAreaLayoutItem(subinfo) : QDockAreaLayoutItem(widgetItem);<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N77: &quot;\u043a\u043e\u0434 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c&quot; \u2013 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u0430<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">typedef unsigned int uint;  ReturnedValue TypedArrayCtor::virtualCallAsConstructor(....) {   ....   qint64 l = argc ? argv[0].toIndex() : 0;   if (scope.engine-&gt;hasException)     return Encode::undefined();   \/\/ ### lift UINT_MAX restriction   if (l &lt; 0 || l &gt; UINT_MAX)     return scope.engine-&gt;throwRangeError(QLatin1String(&quot;Index out of range.&quot;));   uint len = (uint)l;   if (l != len)     scope.engine-&gt;throwRangeError(       QStringLiteral(&quot;Non integer length for typed array.&quot;));   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: V547 [CWE-570] Expression &#8216;l != len&#8217; is always false. qv4typedarray.cpp 306<\/p>\n<p>  <\/p>\n<p>\u041a\u0442\u043e-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 64-\u0431\u0438\u0442\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435 \u0432\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 32-\u0431\u0438\u0442\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <em>unsigned<\/em>. \u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (l &lt; 0 || l &gt; UINT_MAX)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u0435\u043d\u0435\u0435 \u043d\u0430\u0434\u0451\u0436\u043d\u043e\u0439 \u043d\u0435 \u0441\u0442\u0430\u043d\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">uint len = (uint)l; if (l != len)   scope.engine-&gt;throwRangeError(     QStringLiteral(&quot;Non integer length for typed array.&quot;));<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443. \u0414\u0443\u043c\u0430\u044e, \u0438\u0434\u0435\u044e \u0432\u044b \u043f\u043e\u043d\u044f\u043b\u0438.<\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0432\u044b\u0432\u043e\u0434: \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u043e \u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"drugie-oshibki\">\u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438<\/h2>\n<p>  <\/p>\n<p>\u042f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043b 77 \u0434\u0435\u0444\u0435\u043a\u0442\u043e\u0432. \u042d\u0442\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0438 \u0432\u044b\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u0432\u044b\u044f\u0432\u0438\u0442\u044c PVS-Studio. \u041f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u043b\u043e\u0433\u0430 \u044f \u0431\u044b\u043b \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0435\u043d \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u043b \u0432\u0441\u0451, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0430\u0440\u044b \u043c\u0438\u043d\u0443\u0442, \u043e\u0448\u0438\u0431\u043a\u0430 \u044d\u0442\u043e \u0438\u043b\u0438 \u043d\u0435\u0442 :).<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043d\u0430\u0448\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445, \u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u2013 \u044d\u0442\u043e \u043a\u0440\u0443\u0442\u043e! \u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f PVS-Studio \u0431\u0443\u0434\u0435\u0442 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0438 \u043d\u0435\u0440\u0432\u044b, \u0432\u044b\u044f\u0432\u043b\u044f\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u041d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043d\u0430 code review \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u043d\u0435 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u044d\u0442\u0438 \u0434\u0443\u0440\u0430\u0446\u043a\u0438\u0435 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u0440\u044f\u0447\u0443\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435 \u043a\u043e\u0434\u0430 \u0433\u043b\u0430\u0437\u0430\u043c\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u0443\u0441\u0442\u044c \u0438\u0445 \u043b\u0443\u0447\u0448\u0435 \u0438\u0449\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u0430 \u043d\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0449\u0451 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438\u043b\u0438 \u0432\u043e\u0437\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0451\u0439 &quot;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0687\/\">\u041f\u0440\u0438\u0447\u0438\u043d\u044b \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 PVS-Studio<\/a>&quot;. \u0421 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c 90 % \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0432 \u043d\u0435\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u0430\u0448\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b :). \u0412 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f 10 % \u0441\u043b\u0443\u0447\u0430\u0435\u0432 <a href=\"https:\/\/www.viva64.com\/ru\/about-feedback\/\">\u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u0430\u043c<\/a>, \u043f\u043e\u043e\u0431\u0449\u0430\u0435\u043c\u0441\u044f :).<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Andrey Karpov. <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/542758\/\">Date Processing Attracts Bugs or 77 Defects in Qt 6<\/a>.<\/p>\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:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/542760\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/542760\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rf\/oj\/f_\/rfojf_keq9czr_egygfakiowdby.png\" alt=\"PVS-Studio \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 Qt 6\"><br \/>  \u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0440\u0435\u043b\u0438\u0437 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Qt 6, \u0438 \u044d\u0442\u043e \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u0432\u043e\u0434\u043e\u043c \u0432\u043d\u043e\u0432\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0430\u0442. \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0430\u043a PVS-Studio, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\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-318117","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/318117","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=318117"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/318117\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=318117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=318117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=318117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}