Created attachment 112196 [details] Full analyzer report Hi! I've checked Krita 4.0 with PVS-Studio static analyzer and found some bugs. Here are some interesting fragments: https://www.viva64.com/en/b/0569/. Additionally, I attached full HTML-report for you.
Hi, Egor! Thank you for the report! I'll check the logs :) One more link (seems to be yours as well): https://habrahabr.ru/company/pvs-studio/blog/354120/
Git commit 6dfd56d27975ebd0ed609e28f1d62794d98ac38a by Dmitry Kazakov. Committed on 26/04/2018 at 17:29. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: memory leaks in unittests V773 The function was exited without releasing the pointer. A memory leak is possible. M +5 -5 libs/brush/tests/kis_gbr_brush_test.cpp M +15 -28 libs/brush/tests/kis_imagepipe_brush_test.cpp M +2 -5 libs/image/tests/kis_clone_layer_test.cpp M +21 -30 libs/image/tests/kis_iterator_test.cpp M +21 -32 libs/image/tests/kis_iterators_ng_test.cpp M +3 -4 libs/image/tests/kis_simple_update_queue_test.cpp M +1 -2 libs/widgets/tests/zoomhandler_test.cpp M +1 -2 plugins/paintops/libpaintop/tests/kis_embedded_pattern_manager_test.cpp https://commits.kde.org/krita/6dfd56d27975ebd0ed609e28f1d62794d98ac38a
Git commit cb0f9e3a424a6e05a35eb597ac459bfb6fc52416 by Dmitry Kazakov. Committed on 26/04/2018 at 17:29. Pushed by dkazakov into branch 'master'. Fix PVS Studio warning: avoid non-used return value warning in benchmarks V530 The return value of function 'atan2' is required to be utilized. V530 The return value of function 'drand48' is required to be utilized. M +2 -1 benchmarks/kis_fast_math_benchmark.cpp M +2 -1 benchmarks/kis_stroke_benchmark.cpp https://commits.kde.org/krita/cb0f9e3a424a6e05a35eb597ac459bfb6fc52416
Git commit 6ed8fb329f8326444d983f5bb79c08bc982ab428 by Dmitry Kazakov. Committed on 26/04/2018 at 17:30. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: reordered function arguments Just a misprint or copy-paste M +1 -1 benchmarks/kis_gradient_benchmark.cpp M +1 -1 benchmarks/kis_random_iterator_benchmark.cpp M +1 -1 plugins/flake/textshape/kotext/opendocument/KoTextSharedLoadingData.cpp https://commits.kde.org/krita/6ed8fb329f8326444d983f5bb79c08bc982ab428
Git commit 7be37e4a8091c7cf0fd50fbc67e9eebafa4071b2 by Dmitry Kazakov. Committed on 26/04/2018 at 17:30. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: implicit int->qreal conversions cause precision loss V601: The bool type is implicitly cast to the integer type V636: Expression was implicitly cast from 'int' type to 'double' type M +1 -1 libs/flake/KoImageData_p.cpp M +1 -1 libs/ui/widgets/KisVisualEllipticalSelectorShape.cpp M +2 -2 libs/ui/widgets/KisVisualRectangleSelectorShape.cpp M +1 -1 libs/ui/widgets/kis_preset_live_preview_view.cpp M +2 -2 libs/widgets/KoPagePreviewWidget.cpp M +1 -1 libs/widgets/KoRuler.cpp M +6 -5 plugins/dockers/advancedcolorselector/kis_color_selector_wheel.cpp M +1 -4 plugins/flake/pathshapes/enhancedpath/EnhancedPathFormula.cpp M +2 -2 plugins/flake/pathshapes/enhancedpath/EnhancedPathShape.cpp M +3 -3 plugins/tools/tool_smart_patch/kis_inpaint.cpp M +1 -1 plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp https://commits.kde.org/krita/7be37e4a8091c7cf0fd50fbc67e9eebafa4071b2
Git commit 6960317945ed3d44cc5d5ad5c6299d206c52aac6 by Dmitry Kazakov. Committed on 26/04/2018 at 17:30. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: possible memory leaks in production code Most of the leaks are hardly reproducible in normal circumstances. But the one in PNG converter is huge. PNG converter also had an invalid null pointer access, which didn't crash Krita only by a happy coincidence. M +5 -7 libs/flake/svg/SvgParser.cpp M +3 -3 libs/ui/input/kis_input_manager_p.cpp M +46 -30 libs/ui/kis_png_converter.cpp M +5 -1 plugins/flake/textshape/TextTool.cpp M +8 -7 plugins/flake/textshape/kotext/BibliographyGenerator.cpp M +1 -0 plugins/flake/textshape/kotext/KoAnchorTextRange.cpp M +1 -0 plugins/flake/textshape/kotext/OdfTextTrackStyles.cpp M +6 -8 plugins/flake/textshape/kotext/opendocument/KoTextWriter.cpp M +18 -11 plugins/flake/textshape/kotext/opendocument/KoTextWriter_p.cpp M +4 -3 plugins/flake/textshape/kotext/opendocument/KoTextWriter_p.h M +3 -3 plugins/impex/ppm/kis_ppm_import.cpp M +3 -6 plugins/impex/psd/psd_layer_section.cpp M +2 -5 plugins/tools/karbonplugins/tools/filterEffectTool/FilterEffectResource.cpp https://commits.kde.org/krita/6960317945ed3d44cc5d5ad5c6299d206c52aac6
I have fixed almost all the bugs reported in the log.
Git commit 2993d536bce0e0dffe7aaaa865f21c923e6a6fdb by Dmitry Kazakov. Committed on 26/04/2018 at 17:31. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: html correctness in about dialog M +1 -1 libs/ui/dialogs/kis_about_application.cpp https://commits.kde.org/krita/2993d536bce0e0dffe7aaaa865f21c923e6a6fdb
Git commit 88a77342d300a341f57e2a4a78c877f231c1ba63 by Dmitry Kazakov. Committed on 26/04/2018 at 17:30. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: one more leak in a unittest M +7 -7 plugins/tools/tool_transform2/tests/test_animated_transform_parameters.cpp https://commits.kde.org/krita/88a77342d300a341f57e2a4a78c877f231c1ba63
Git commit df92768617243f78c08c681e0bb08c66db9de1f8 by Dmitry Kazakov. Committed on 26/04/2018 at 17:32. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: naver happening 'if' condition M +1 -2 plugins/tools/svgtexttool/SvgTextEditor.cpp https://commits.kde.org/krita/df92768617243f78c08c681e0bb08c66db9de1f8
Git commit 03d026c9179f24acc7c3f3f669bf75480051b3ad by Dmitry Kazakov. Committed on 26/04/2018 at 17:31. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: for-each loop should accept a reference to actually do something M +1 -1 libs/global/kis_algebra_2d.cpp https://commits.kde.org/krita/03d026c9179f24acc7c3f3f669bf75480051b3ad
Git commit b4ff0e274a1a1a06ede6f25237070f2ec7546d37 by Dmitry Kazakov. Committed on 26/04/2018 at 17:30. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: possible null/invalid pointer dereference M +2 -1 libs/flake/KoToolManager.cpp M +1 -1 libs/flake/resources/KoSvgSymbolCollectionResource.cpp M +1 -1 libs/image/commands_new/kis_saved_commands.cpp M +1 -1 libs/image/kis_raster_keyframe_channel.cpp M +6 -4 libs/ui/KisView.cpp M +3 -3 libs/ui/kis_node_manager.cpp M +1 -1 libs/ui/opengl/kis_texture_tile.cpp M +1 -2 libs/ui/widgets/kis_gradient_chooser.cc M +4 -3 plugins/filters/colorsfilters/kis_perchannel_filter.cpp M +2 -2 plugins/flake/artistictextshape/ArtisticTextTool.cpp M +0 -1 plugins/flake/textshape/kotext/styles/KoListLevelProperties.cpp M +8 -8 plugins/impex/ora/kis_open_raster_stack_save_visitor.cpp M +2 -1 plugins/impex/psd/psd_loader.cpp M +1 -0 plugins/impex/spriter/kis_spriter_export.cpp M +1 -1 plugins/impex/spriter/kis_spriter_export.h M +1 -1 plugins/tools/karbonplugins/tools/filterEffectTool/FilterEffectScene.cpp https://commits.kde.org/krita/b4ff0e274a1a1a06ede6f25237070f2ec7546d37
Git commit 1e67dff0b6b14abbbdbf417fb69f914c8d5bd213 by Dmitry Kazakov. Committed on 26/04/2018 at 17:31. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: initializing non-POD struct with memset QVector is not a POD, so we shouldn't try to initialize it with bruteforce memset. M +10 -10 libs/psd/psd.h M +0 -1 libs/psd/psd_pattern.cpp https://commits.kde.org/krita/1e67dff0b6b14abbbdbf417fb69f914c8d5bd213
Git commit b1806fb959f21633fadaf7a99e751725344eb16e by Dmitry Kazakov. Committed on 26/04/2018 at 17:31. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: fix logic of 'if's Negative of disjunction is conjunstion, so we should not only change '==' into '!=', but also change the operator (see De Morgan's law) M +3 -2 libs/flake/text/KoSvgTextShapeMarkupConverter.cpp M +2 -2 libs/widgets/KoResourceItemChooser.cpp https://commits.kde.org/krita/b1806fb959f21633fadaf7a99e751725344eb16e
Git commit c68f1701eb341dff0e2db8334ca912ac7c0542ea by Dmitry Kazakov. Committed on 26/04/2018 at 17:30. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: reword correct but weird code The patch shouldn't change any behavior, just make the code more logical :) M +1 -1 libs/flake/KoPathShape.cpp M +3 -2 libs/flake/KoShape.cpp M +1 -2 libs/flake/commands/KoShapeReorderCommand.cpp M +1 -2 libs/flake/svg/SvgStyleParser.cpp M +1 -3 libs/global/kis_debug.cpp M +1 -1 libs/image/kis_convolution_worker_spatial.h M +1 -2 libs/image/kis_paint_layer.cc M +5 -5 libs/image/kis_processing_applicator.cpp M +5 -5 libs/image/kis_properties_configuration.cc M +5 -14 libs/image/kis_selection_filters.cpp M +7 -2 libs/image/kis_transform_worker.cc M +1 -5 libs/image/kis_update_scheduler.cpp M +3 -1 libs/image/metadata/kis_meta_data_value.h M +0 -7 libs/image/tests/kis_mask_generator_test.cpp M +2 -0 libs/image/tests/kis_meta_data_test.cpp M +0 -1 libs/image/tiles3/kis_tiled_data_manager.cc M +5 -5 libs/odf/KoOdfNumberDefinition.cpp M +1 -1 libs/pigment/resources/KoColorSet.cpp M +1 -1 libs/psd/psd_utils.cpp M +48 -50 libs/ui/actions/kis_selection_action_factories.cpp M +1 -3 libs/ui/tool/kis_tool_paint.cc M +1 -2 plugins/color/lcms2engine/LcmsEnginePlugin.cpp M +2 -1 plugins/dockers/advancedcolorselector/kis_color_selector_base.cpp M +2 -5 plugins/dockers/animation/kis_draggable_tool_button.cpp M +3 -3 plugins/dockers/lut/ocio_display_filter.cpp M +2 -2 plugins/flake/textshape/kotext/KoInlineTextObjectManager.cpp M +4 -4 plugins/flake/textshape/kotext/KoTextDebug.cpp M +1 -2 plugins/flake/textshape/textlayout/KoTextLayoutArea.cpp M +3 -2 plugins/impex/csv/csv_saver.cpp M +6 -9 plugins/impex/kra/kra_converter.cpp M +2 -3 plugins/impex/libkra/kis_kra_load_visitor.cpp M +1 -1 plugins/impex/libkra/kis_kra_load_visitor.h M +2 -2 plugins/impex/libkra/kis_kra_save_visitor.cpp M +1 -2 plugins/impex/ora/kis_open_raster_stack_load_visitor.cpp M +2 -7 plugins/impex/pdf/kis_pdf_import.cpp M +0 -24 plugins/impex/psd/psd_additional_layer_info_block.cpp M +1 -1 plugins/impex/psd/psd_header.cpp M +1 -1 plugins/impex/psd/psd_pixel_utils.cpp M +0 -1 plugins/paintops/gridbrush/kis_grid_paintop.cpp M +1 -2 plugins/tools/basictools/kis_tool_move.cc https://commits.kde.org/krita/c68f1701eb341dff0e2db8334ca912ac7c0542ea
Git commit 2102af05a2c1b05b6ca9e67f9209c7e21502c600 by Dmitry Kazakov. Committed on 26/04/2018 at 17:32. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: the loop iterates only once I don't know why it happened so, but it seems it is just a result of the fork of KDE's code M +2 -0 libs/widgetutils/config/khelpclient.cpp https://commits.kde.org/krita/2102af05a2c1b05b6ca9e67f9209c7e21502c600
Git commit 7ca71b6ec258d05e9a39aa0178d1a503d340164d by Dmitry Kazakov. Committed on 26/04/2018 at 17:31. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: recover lost 'else' tag in if-else :) M +2 -2 libs/flake/svg/SvgStyleWriter.cpp https://commits.kde.org/krita/7ca71b6ec258d05e9a39aa0178d1a503d340164d
Git commit f912a10eda97ef6a6564db4db1991a3efbf879f4 by Dmitry Kazakov. Committed on 26/04/2018 at 17:32. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: loop is actually infinite Well, it seems like the loop should be infinite by design, though I'm not very sure :) Since this code is abandoned and not used in Krita atm, I just added a todo. M +4 -3 libs/flake/KoConnectionShape.cpp https://commits.kde.org/krita/f912a10eda97ef6a6564db4db1991a3efbf879f4
Git commit 368bd56bfd9341627197180ad277758d2d4ba257 by Dmitry Kazakov. Committed on 26/04/2018 at 17:32. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: uninitialized variables in KisMinHeap Calling c-tors from other c-tors appeared in C++ much later than this code has been written :) M +11 -9 libs/ui/kis_min_heap.h https://commits.kde.org/krita/368bd56bfd9341627197180ad277758d2d4ba257
Git commit 45cd5e436c54b1558856509f0c626d652fef9756 by Dmitry Kazakov. Committed on 26/04/2018 at 17:30. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: brush spacing should be saved as double, not bool M +1 -1 plugins/impex/brush/kis_brush_export.cpp https://commits.kde.org/krita/45cd5e436c54b1558856509f0c626d652fef9756
Git commit 7bc329344257c71716f95c4dbd85077566a408c0 by Dmitry Kazakov. Committed on 26/04/2018 at 17:31. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: parseTagName() should actually return some value M +11 -11 libs/ui/kisexiv2/kis_xmp_io.cpp https://commits.kde.org/krita/7bc329344257c71716f95c4dbd85077566a408c0
Git commit 9790c311ed0da5af6077ead5b4fb1165011aee2d by Dmitry Kazakov. Committed on 26/04/2018 at 17:32. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: misprint in KisPressureSizeOption::lodLimitations() M +2 -1 plugins/paintops/libpaintop/kis_pressure_size_option.cpp https://commits.kde.org/krita/9790c311ed0da5af6077ead5b4fb1165011aee2d
Git commit 9f76caa714c34891b77a277520c78188be10c56d by Dmitry Kazakov. Committed on 26/04/2018 at 17:31. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: uninitialized variables used in the loop M +2 -2 libs/ui/kis_painting_assistant.cc https://commits.kde.org/krita/9f76caa714c34891b77a277520c78188be10c56d
Git commit 84089c1e79d253500167d7e37ece7ee89889ca23 by Dmitry Kazakov. Committed on 26/04/2018 at 17:51. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: fix Hairy Brush ink opacity depletion M +2 -1 plugins/paintops/hairy/hairy_brush.cpp https://commits.kde.org/krita/84089c1e79d253500167d7e37ece7ee89889ca23
Git commit 092c2fbeb5336278a3246c9caf0362b3665220bf by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: naver happening 'if' condition (cherry picked from commit df92768617243f78c08c681e0bb08c66db9de1f8) (cherry picked from commit 3037e8d4a5fa76cec32400f67ba19f403d9112d3) M +1 -2 plugins/tools/svgtexttool/SvgTextEditor.cpp https://commits.kde.org/krita/092c2fbeb5336278a3246c9caf0362b3665220bf
Git commit 4ba5ca4eeaab9c44856790ae257b923a9ff70cfd by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: loop is actually infinite Well, it seems like the loop should be infinite by design, though I'm not very sure :) Since this code is abandoned and not used in Krita atm, I just added a todo. (cherry picked from commit f912a10eda97ef6a6564db4db1991a3efbf879f4) (cherry picked from commit c2d5a2a0ed4a5302205635dd6eca15fde4f3c2db) M +4 -3 libs/flake/KoConnectionShape.cpp https://commits.kde.org/krita/4ba5ca4eeaab9c44856790ae257b923a9ff70cfd
Git commit e59b94ac787e3b303d26bfd88a4d92e2b0199740 by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: initializing non-POD struct with memset QVector is not a POD, so we shouldn't try to initialize it with bruteforce memset. (cherry picked from commit 1e67dff0b6b14abbbdbf417fb69f914c8d5bd213) (cherry picked from commit 0188944135a4b982b51902c818469b088c9b0c7f) M +10 -10 libs/psd/psd.h M +0 -1 libs/psd/psd_pattern.cpp https://commits.kde.org/krita/e59b94ac787e3b303d26bfd88a4d92e2b0199740
Git commit c4a9acd24f1db7186548bab168b0abdc20d125b5 by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: misprint in KisPressureSizeOption::lodLimitations() (cherry picked from commit 9790c311ed0da5af6077ead5b4fb1165011aee2d) (cherry picked from commit 634b2f9da8b4e6eae69a84708392f5cba8a3a508) M +2 -1 plugins/paintops/libpaintop/kis_pressure_size_option.cpp https://commits.kde.org/krita/c4a9acd24f1db7186548bab168b0abdc20d125b5
Git commit 41a1b4b9670450bc404512861508eb38b158f8ce by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: the loop iterates only once I don't know why it happened so, but it seems it is just a result of the fork of KDE's code (cherry picked from commit 2102af05a2c1b05b6ca9e67f9209c7e21502c600) (cherry picked from commit 26eef9065fa82ef2be34fb9c0a95062508aedf41) M +2 -0 libs/widgetutils/config/khelpclient.cpp https://commits.kde.org/krita/41a1b4b9670450bc404512861508eb38b158f8ce
Git commit 3c97d1633c8f0578d6df105d7b8df71378826d0f by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: reordered function arguments Just a misprint or copy-paste (cherry picked from commit 6ed8fb329f8326444d983f5bb79c08bc982ab428) (cherry picked from commit 42b6c6b50a87d9ff586bdaf5c82d44a97d266805) M +1 -1 benchmarks/kis_gradient_benchmark.cpp M +1 -1 benchmarks/kis_random_iterator_benchmark.cpp M +1 -1 plugins/flake/textshape/kotext/opendocument/KoTextSharedLoadingData.cpp https://commits.kde.org/krita/3c97d1633c8f0578d6df105d7b8df71378826d0f
Git commit ea406629fcbfddadf560bc5ae1f5b51825d929be by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: memory leaks in unittests V773 The function was exited without releasing the pointer. A memory leak is possible. (cherry picked from commit 3ec75b535e65a286ef8f09369121c4cecfb3e607) M +5 -5 libs/brush/tests/kis_gbr_brush_test.cpp M +15 -28 libs/brush/tests/kis_imagepipe_brush_test.cpp M +2 -5 libs/image/tests/kis_clone_layer_test.cpp M +21 -30 libs/image/tests/kis_iterator_test.cpp M +21 -32 libs/image/tests/kis_iterators_ng_test.cpp M +3 -4 libs/image/tests/kis_simple_update_queue_test.cpp M +1 -2 libs/widgets/tests/zoomhandler_test.cpp M +1 -2 plugins/paintops/libpaintop/tests/kis_embedded_pattern_manager_test.cpp https://commits.kde.org/krita/ea406629fcbfddadf560bc5ae1f5b51825d929be
Git commit 1dba3bba6960524e1c84677636f8eef459819814 by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS Studio warning: avoid non-used return value warning in benchmarks V530 The return value of function 'atan2' is required to be utilized. V530 The return value of function 'drand48' is required to be utilized. (cherry picked from commit 6585c96eff6169884d07f3ef36de0d20480a57df) M +2 -1 benchmarks/kis_fast_math_benchmark.cpp M +2 -1 benchmarks/kis_stroke_benchmark.cpp https://commits.kde.org/krita/1dba3bba6960524e1c84677636f8eef459819814
Git commit d8f702a102f9acb1690bed6f908b7d1cf637063d by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: parseTagName() should actually return some value (cherry picked from commit 7bc329344257c71716f95c4dbd85077566a408c0) (cherry picked from commit fa1b241513542375444539eefb5647dc886f7abe) M +11 -11 libs/ui/kisexiv2/kis_xmp_io.cpp https://commits.kde.org/krita/d8f702a102f9acb1690bed6f908b7d1cf637063d
Git commit e537b5f6a8aeb4bb9c6014a74c3388b0e9722a7b by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: uninitialized variables used in the loop (cherry picked from commit 9f76caa714c34891b77a277520c78188be10c56d) (cherry picked from commit 266785dfe95c103cc0ba1cceb3d9dc00d3afdb3d) M +2 -2 libs/ui/kis_painting_assistant.cc https://commits.kde.org/krita/e537b5f6a8aeb4bb9c6014a74c3388b0e9722a7b
Git commit 90b42ce4bd465c67b7c13d65f6a3dd44b8c3ed6a by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: html correctness in about dialog (cherry picked from commit 2993d536bce0e0dffe7aaaa865f21c923e6a6fdb) (cherry picked from commit d85c28fe7be833f7bf9d2f332a51e5f31862cc31) M +1 -1 libs/ui/dialogs/kis_about_application.cpp https://commits.kde.org/krita/90b42ce4bd465c67b7c13d65f6a3dd44b8c3ed6a
Git commit 9c16ca110fc9ee6abcd45dbed004ec3a24aba8dd by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: uninitialized variables in KisMinHeap Calling c-tors from other c-tors appeared in C++ much later than this code has been written :) (cherry picked from commit 368bd56bfd9341627197180ad277758d2d4ba257) (cherry picked from commit 7b77cbad1c1e0ed8d47fb81c8b5449837e9877a1) M +11 -9 libs/ui/kis_min_heap.h https://commits.kde.org/krita/9c16ca110fc9ee6abcd45dbed004ec3a24aba8dd
Git commit 60d253b834694eb585421200c867cc80f895b190 by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: for-each loop should accept a reference to actually do something (cherry picked from commit 03d026c9179f24acc7c3f3f669bf75480051b3ad) (cherry picked from commit 18834a3ba524b8526a63e0b98877976c47840e7a) M +1 -1 libs/global/kis_algebra_2d.cpp https://commits.kde.org/krita/60d253b834694eb585421200c867cc80f895b190
Git commit efbcd85cc932ee5f8bd7af141cf265e343583d7e by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: possible memory leaks in production code Most of the leaks are hardly reproducible in normal circumstances. But the one in PNG converter is huge. PNG converter also had an invalid null pointer access, which didn't crash Krita only by a happy coincidence. (cherry picked from commit 6960317945ed3d44cc5d5ad5c6299d206c52aac6) (cherry picked from commit 2496b1264b1dd3fe5d2bf3a6e4129053e3672367) M +5 -7 libs/flake/svg/SvgParser.cpp M +3 -3 libs/ui/input/kis_input_manager_p.cpp M +46 -30 libs/ui/kis_png_converter.cpp M +5 -1 plugins/flake/textshape/TextTool.cpp M +8 -7 plugins/flake/textshape/kotext/BibliographyGenerator.cpp M +1 -0 plugins/flake/textshape/kotext/KoAnchorTextRange.cpp M +1 -0 plugins/flake/textshape/kotext/OdfTextTrackStyles.cpp M +6 -8 plugins/flake/textshape/kotext/opendocument/KoTextWriter.cpp M +18 -11 plugins/flake/textshape/kotext/opendocument/KoTextWriter_p.cpp M +4 -3 plugins/flake/textshape/kotext/opendocument/KoTextWriter_p.h M +3 -3 plugins/impex/ppm/kis_ppm_import.cpp M +3 -6 plugins/impex/psd/psd_layer_section.cpp M +2 -5 plugins/tools/karbonplugins/tools/filterEffectTool/FilterEffectResource.cpp https://commits.kde.org/krita/efbcd85cc932ee5f8bd7af141cf265e343583d7e
Git commit 4a5c56c34899cc98cdf4fd8a86266d7816bce3fe by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: brush spacing should be saved as double, not bool (cherry picked from commit 45cd5e436c54b1558856509f0c626d652fef9756) (cherry picked from commit 2b8f9f6daf2f125b98477c93e2ecbff925a6e6e7) M +1 -1 plugins/impex/brush/kis_brush_export.cpp https://commits.kde.org/krita/4a5c56c34899cc98cdf4fd8a86266d7816bce3fe
Git commit efba89b8abbc938178df2eee4a83ccba899a3586 by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: reword correct but weird code The patch shouldn't change any behavior, just make the code more logical :) (cherry picked from commit c68f1701eb341dff0e2db8334ca912ac7c0542ea) (cherry picked from commit b9431cf492e9692766bb9634b1e023c09fe50f32) M +1 -1 libs/flake/KoPathShape.cpp M +3 -2 libs/flake/KoShape.cpp M +1 -2 libs/flake/commands/KoShapeReorderCommand.cpp M +1 -2 libs/flake/svg/SvgStyleParser.cpp M +1 -3 libs/global/kis_debug.cpp M +1 -1 libs/image/kis_convolution_worker_spatial.h M +1 -2 libs/image/kis_paint_layer.cc M +5 -5 libs/image/kis_processing_applicator.cpp M +5 -5 libs/image/kis_properties_configuration.cc M +5 -14 libs/image/kis_selection_filters.cpp M +7 -2 libs/image/kis_transform_worker.cc M +1 -5 libs/image/kis_update_scheduler.cpp M +3 -1 libs/image/metadata/kis_meta_data_value.h M +0 -7 libs/image/tests/kis_mask_generator_test.cpp M +2 -0 libs/image/tests/kis_meta_data_test.cpp M +0 -1 libs/image/tiles3/kis_tiled_data_manager.cc M +5 -5 libs/odf/KoOdfNumberDefinition.cpp M +1 -1 libs/pigment/resources/KoColorSet.cpp M +1 -1 libs/psd/psd_utils.cpp M +48 -50 libs/ui/actions/kis_selection_action_factories.cpp M +1 -3 libs/ui/tool/kis_tool_paint.cc M +1 -2 plugins/color/lcms2engine/LcmsEnginePlugin.cpp M +2 -1 plugins/dockers/advancedcolorselector/kis_color_selector_base.cpp M +2 -5 plugins/dockers/animation/kis_draggable_tool_button.cpp M +3 -3 plugins/dockers/lut/ocio_display_filter.cpp M +2 -2 plugins/flake/textshape/kotext/KoInlineTextObjectManager.cpp M +4 -4 plugins/flake/textshape/kotext/KoTextDebug.cpp M +1 -2 plugins/flake/textshape/textlayout/KoTextLayoutArea.cpp M +3 -2 plugins/impex/csv/csv_saver.cpp M +6 -9 plugins/impex/kra/kra_converter.cpp M +2 -3 plugins/impex/libkra/kis_kra_load_visitor.cpp M +1 -1 plugins/impex/libkra/kis_kra_load_visitor.h M +2 -2 plugins/impex/libkra/kis_kra_save_visitor.cpp M +1 -2 plugins/impex/ora/kis_open_raster_stack_load_visitor.cpp M +2 -7 plugins/impex/pdf/kis_pdf_import.cpp M +0 -24 plugins/impex/psd/psd_additional_layer_info_block.cpp M +1 -1 plugins/impex/psd/psd_header.cpp M +1 -1 plugins/impex/psd/psd_pixel_utils.cpp M +0 -1 plugins/paintops/gridbrush/kis_grid_paintop.cpp M +1 -2 plugins/tools/basictools/kis_tool_move.cc https://commits.kde.org/krita/efba89b8abbc938178df2eee4a83ccba899a3586
Git commit a4a0eef07f3256a9f9c347a3d21426da257c9975 by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: implicit int->qreal conversions cause precision loss V601: The bool type is implicitly cast to the integer type V636: Expression was implicitly cast from 'int' type to 'double' type (cherry picked from commit ed51df9bc022a95250e3d2a084d88589b18e0d35) M +1 -1 libs/flake/KoImageData_p.cpp M +1 -1 libs/ui/widgets/KisVisualEllipticalSelectorShape.cpp M +2 -2 libs/ui/widgets/KisVisualRectangleSelectorShape.cpp M +1 -1 libs/ui/widgets/kis_preset_live_preview_view.cpp M +2 -2 libs/widgets/KoPagePreviewWidget.cpp M +1 -1 libs/widgets/KoRuler.cpp M +6 -5 plugins/dockers/advancedcolorselector/kis_color_selector_wheel.cpp M +1 -4 plugins/flake/pathshapes/enhancedpath/EnhancedPathFormula.cpp M +2 -2 plugins/flake/pathshapes/enhancedpath/EnhancedPathShape.cpp M +3 -3 plugins/tools/tool_smart_patch/kis_inpaint.cpp M +1 -1 plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp https://commits.kde.org/krita/a4a0eef07f3256a9f9c347a3d21426da257c9975
Git commit 860b1e6b22b0efc41cb319246b95e3b25a805fe2 by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: recover lost 'else' tag in if-else :) (cherry picked from commit 7ca71b6ec258d05e9a39aa0178d1a503d340164d) (cherry picked from commit db63da632138fc3eb33611d6ac66ac6fd7f33d61) M +2 -2 libs/flake/svg/SvgStyleWriter.cpp https://commits.kde.org/krita/860b1e6b22b0efc41cb319246b95e3b25a805fe2
Git commit 8c70ffd1ab3520527251062d3acc4480ba079f7d by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: fix Hairy Brush ink opacity depletion (cherry picked from commit 84089c1e79d253500167d7e37ece7ee89889ca23) (cherry picked from commit 290e94486bc381f0cac74cdbe9b3c2a38c69c642) M +1 -0 plugins/paintops/hairy/hairy_brush.cpp https://commits.kde.org/krita/8c70ffd1ab3520527251062d3acc4480ba079f7d
Git commit 614bd97b93c9fe8602f63ebe9ae53a353ff27a4f by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 02/05/2018 at 11:54. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: one more leak in a unittest (cherry picked from commit 88a77342d300a341f57e2a4a78c877f231c1ba63) (cherry picked from commit ece3e4439f9052f1d756a57aef62d8a0330d7678) M +7 -7 plugins/tools/tool_transform2/tests/test_animated_transform_parameters.cpp https://commits.kde.org/krita/614bd97b93c9fe8602f63ebe9ae53a353ff27a4f
Git commit e443b1a7191157dae1f6234c82704e075bc63213 by Dmitry Kazakov. Committed on 02/05/2018 at 15:34. Pushed by dkazakov into branch 'master'. Fix PVS-Studio warning: overwriting the parameter The real bug was actually not in the fact that the variable was unused, but that its usage was different in two (scalar and vector) implementations of alphadarken compositor. M +7 -0 libs/pigment/compositeops/KoOptimizedCompositeOpAlphaDarken128.h M +7 -0 libs/pigment/compositeops/KoOptimizedCompositeOpAlphaDarken32.h https://commits.kde.org/krita/e443b1a7191157dae1f6234c82704e075bc63213
Git commit 2561915e8b6e053119cb39f2703fb5fbf9e6feaf by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 04/05/2018 at 08:28. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: overwriting the parameter The real bug was actually not in the fact that the variable was unused, but that its usage was different in two (scalar and vector) implementations of alphadarken compositor. (cherry picked from commit e443b1a7191157dae1f6234c82704e075bc63213) M +7 -0 libs/pigment/compositeops/KoOptimizedCompositeOpAlphaDarken128.h M +7 -0 libs/pigment/compositeops/KoOptimizedCompositeOpAlphaDarken32.h https://commits.kde.org/krita/2561915e8b6e053119cb39f2703fb5fbf9e6feaf
Git commit 65a446c269ac6e85eb38fd7d169dc11f4daa7acd by Boudewijn Rempt, on behalf of Dmitry Kazakov. Committed on 04/06/2018 at 09:57. Pushed by rempt into branch 'krita/4.0'. Fix PVS-Studio warning: fix logic of 'if's Negative of disjunction is conjunstion, so we should not only change '==' into '!=', but also change the operator (see De Morgan's law) (cherry picked from commit b1806fb959f21633fadaf7a99e751725344eb16e) M +3 -2 libs/flake/text/KoSvgTextShapeMarkupConverter.cpp M +2 -2 libs/widgets/KoResourceItemChooser.cpp https://commits.kde.org/krita/65a446c269ac6e85eb38fd7d169dc11f4daa7acd