New Defects reported by Coverity Scan for krita
scan-admin at coverity.com
scan-admin at coverity.com
Mon Feb 28 22:33:49 GMT 2022
Hi,
Please find the latest report on new defect(s) introduced to krita found with Coverity Scan.
176 new defect(s) introduced to krita found with Coverity Scan.
131 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 20 of 176 defect(s)
** CID 350248: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/ui/flake/kis_shape_selection.cpp: 54 in KisShapeSelection::KisShapeSelection(KoShapeControllerBase *, KisWeakSharedPtr<KisImage>, KisWeakSharedPtr<KisSelection>)()
________________________________________________________________________________________________________
*** CID 350248: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/ui/flake/kis_shape_selection.cpp: 54 in KisShapeSelection::KisShapeSelection(KoShapeControllerBase *, KisWeakSharedPtr<KisImage>, KisWeakSharedPtr<KisSelection>)()
48 #include <kis_debug.h>
49
50 KisShapeSelection::KisShapeSelection(KoShapeControllerBase *shapeControllerBase, KisImageWSP image, KisSelectionWSP selection)
51 : KoShapeLayer(m_model = new KisShapeSelectionModel(image, selection, this))
52 {
53 init(image, shapeControllerBase);
>>> CID 350248: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "m_shapeControllerBase" is not initialized in this constructor nor in any functions that it calls.
54 }
55
56 KisShapeSelection::~KisShapeSelection()
57 {
58 m_model->setShapeSelection(0);
59 delete m_canvas;
** CID 350247: Uninitialized variables (UNINIT)
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.cpp: 131 in KisCurvePaintOpSettings::uniformProperties(KisPinnedSharedPtr<KisPaintOpSettings>, QPointer<KisPaintOpPresetUpdateProxy>)::[lambda(KisUniformPaintOpProperty *) (instance 5)]::operator ()(KisUniformPaintOpProperty *) const()
________________________________________________________________________________________________________
*** CID 350247: Uninitialized variables (UNINIT)
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.cpp: 131 in KisCurvePaintOpSettings::uniformProperties(KisPinnedSharedPtr<KisPaintOpSettings>, QPointer<KisPaintOpPresetUpdateProxy>)::[lambda(KisUniformPaintOpProperty *) (instance 5)]::operator ()(KisUniformPaintOpProperty *) const()
125 prop->setSuffix(i18n("%"));
126
127 prop->setReadCallback(
128 [](KisUniformPaintOpProperty *prop) {
129 KisCurveOptionProperties option;
130 option.readOptionSetting(prop->settings().data());
>>> CID 350247: Uninitialized variables (UNINIT)
>>> Using uninitialized value "option.curve_curves_opacity".
131 prop->setValue(option.curve_curves_opacity * 100.0);
132 });
133 prop->setWriteCallback(
134 [](KisUniformPaintOpProperty *prop) {
135 KisCurveOptionProperties option;
136 option.readOptionSetting(prop->settings().data());
** CID 350246: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp: 41 in MoveStrokeStrategy::MoveStrokeStrategy(KisNodeSelectionRecipe, KisUpdatesFacade *, KisStrokeUndoFacade *)()
________________________________________________________________________________________________________
*** CID 350246: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp: 41 in MoveStrokeStrategy::MoveStrokeStrategy(KisNodeSelectionRecipe, KisUpdatesFacade *, KisStrokeUndoFacade *)()
35 m_updatesFacade(updatesFacade),
36 m_updatesEnabled(true)
37 {
38 setSupportsWrapAroundMode(true);
39
40 enableJob(KisSimpleStrokeStrategy::JOB_INIT, true, KisStrokeJobData::BARRIER);
>>> CID 350246: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "keyframeCommand" is not initialized in this constructor nor in any functions that it calls.
41 }
42
43 MoveStrokeStrategy::MoveStrokeStrategy(KisNodeList nodes, KisUpdatesFacade *updatesFacade, KisStrokeUndoFacade *undoFacade)
44 : MoveStrokeStrategy(KisNodeSelectionRecipe(nodes), updatesFacade, undoFacade)
45 {
46 }
** CID 350245: (UNINIT)
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp: 68 in KisCurveOpOption::readOptionSetting(KisPinnedSharedPtr<KisPropertiesConfiguration>)()
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp: 69 in KisCurveOpOption::readOptionSetting(KisPinnedSharedPtr<KisPropertiesConfiguration>)()
________________________________________________________________________________________________________
*** CID 350245: (UNINIT)
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp: 72 in KisCurveOpOption::readOptionSetting(KisPinnedSharedPtr<KisPropertiesConfiguration>)()
66 op.readOptionSetting(config);
67
68 m_options->connectionCHBox->setChecked(op.curve_paint_connection_line);
69 m_options->smoothingCHBox->setChecked(op.curve_smoothing);
70 m_options->historySizeSlider->setValue(op.curve_stroke_history_size);
71 m_options->lineWidthSlider->setValue(op.curve_line_width);
>>> CID 350245: (UNINIT)
>>> Using uninitialized value "op.curve_curves_opacity" when calling "setValue".
72 m_options->curvesOpacitySlider->setValue(op.curve_curves_opacity);
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp: 71 in KisCurveOpOption::readOptionSetting(KisPinnedSharedPtr<KisPropertiesConfiguration>)()
65 KisCurveOptionProperties op;
66 op.readOptionSetting(config);
67
68 m_options->connectionCHBox->setChecked(op.curve_paint_connection_line);
69 m_options->smoothingCHBox->setChecked(op.curve_smoothing);
70 m_options->historySizeSlider->setValue(op.curve_stroke_history_size);
>>> CID 350245: (UNINIT)
>>> Using uninitialized value "op.curve_line_width" when calling "setValue".
71 m_options->lineWidthSlider->setValue(op.curve_line_width);
72 m_options->curvesOpacitySlider->setValue(op.curve_curves_opacity);
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp: 68 in KisCurveOpOption::readOptionSetting(KisPinnedSharedPtr<KisPropertiesConfiguration>)()
62
63 void KisCurveOpOption::readOptionSetting(const KisPropertiesConfigurationSP config)
64 {
65 KisCurveOptionProperties op;
66 op.readOptionSetting(config);
67
>>> CID 350245: (UNINIT)
>>> Using uninitialized value "op.curve_paint_connection_line" when calling "setChecked".
68 m_options->connectionCHBox->setChecked(op.curve_paint_connection_line);
69 m_options->smoothingCHBox->setChecked(op.curve_smoothing);
70 m_options->historySizeSlider->setValue(op.curve_stroke_history_size);
71 m_options->lineWidthSlider->setValue(op.curve_line_width);
72 m_options->curvesOpacitySlider->setValue(op.curve_curves_opacity);
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp: 70 in KisCurveOpOption::readOptionSetting(KisPinnedSharedPtr<KisPropertiesConfiguration>)()
64 {
65 KisCurveOptionProperties op;
66 op.readOptionSetting(config);
67
68 m_options->connectionCHBox->setChecked(op.curve_paint_connection_line);
69 m_options->smoothingCHBox->setChecked(op.curve_smoothing);
>>> CID 350245: (UNINIT)
>>> Using uninitialized value "op.curve_stroke_history_size" when calling "setValue".
70 m_options->historySizeSlider->setValue(op.curve_stroke_history_size);
71 m_options->lineWidthSlider->setValue(op.curve_line_width);
72 m_options->curvesOpacitySlider->setValue(op.curve_curves_opacity);
/home/tymon/kritadev/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp: 69 in KisCurveOpOption::readOptionSetting(KisPinnedSharedPtr<KisPropertiesConfiguration>)()
63 void KisCurveOpOption::readOptionSetting(const KisPropertiesConfigurationSP config)
64 {
65 KisCurveOptionProperties op;
66 op.readOptionSetting(config);
67
68 m_options->connectionCHBox->setChecked(op.curve_paint_connection_line);
>>> CID 350245: (UNINIT)
>>> Using uninitialized value "op.curve_smoothing" when calling "setChecked".
69 m_options->smoothingCHBox->setChecked(op.curve_smoothing);
70 m_options->historySizeSlider->setValue(op.curve_stroke_history_size);
71 m_options->lineWidthSlider->setValue(op.curve_line_width);
72 m_options->curvesOpacitySlider->setValue(op.curve_curves_opacity);
** CID 350244: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 350244: Null pointer dereferences (FORWARD_NULL)
/home/tymon/kritadev/krita/plugins/paintops/libpaintop/kis_brush_based_paintop_settings.cpp: 259 in KisBrushBasedPaintOpSettings::uniformProperties(KisPinnedSharedPtr<KisPaintOpSettings>, QPointer<KisPaintOpPresetUpdateProxy>)::[lambda(KisUniformPaintOpProperty *) (instance 4)]::operator ()(KisUniformPaintOpProperty *) const()
253 });
254 prop->setWriteCallback(
255 [](KisUniformPaintOpProperty *prop) {
256 KisBrushBasedPaintOpSettings *s =
257 dynamic_cast<KisBrushBasedPaintOpSettings*>(prop->settings().data());
258
>>> CID 350244: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "s" to "autoSpacingCoeff", which dereferences it.
259 s->setAutoSpacing(prop->value().toBool(), s->autoSpacingCoeff());
260 });
261
262 QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
263 prop->requestReadValue();
264 props << toQShared(prop);
** CID 350243: Control flow issues (DEADCODE)
/home/tymon/kritadev/krita/libs/ui/kis_animation_importer.cpp: 111 in KisAnimationImporter::import(QStringList, int, int, bool, bool, int, bool, QList<int>)()
________________________________________________________________________________________________________
*** CID 350243: Control flow issues (DEADCODE)
/home/tymon/kritadev/krita/libs/ui/kis_animation_importer.cpp: 111 in KisAnimationImporter::import(QStringList, int, int, bool, bool, int, bool, QList<int>)()
105
106 if (firstFrameNumber == 0){
107 startfrom0 = false; // if enabled, the zeroth frame will be places in -1 slot, leading to an error
108 }
109
110 fileNumberRxList.clear();
>>> CID 350243: Control flow issues (DEADCODE)
>>> Execution cannot reach the expression "1" inside this statement: "offset = (startfrom0 ? 1 : 0);".
111 const int offset = (startfrom0 ? 1 : 0); //offset added to consider file numbering starts from 1 instead of 0
112 int autoframe = 0;
113
114 KisConfig cfg(true);
115
116 Q_FOREACH(QString file, files) {
** CID 350242: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/ui/tests/KisDocumentReplaceTest.h: 25 in KisDocumentReplaceTest::KisDocumentReplaceTest()()
________________________________________________________________________________________________________
*** CID 350242: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/ui/tests/KisDocumentReplaceTest.h: 25 in KisDocumentReplaceTest::KisDocumentReplaceTest()()
19 void finalize();
20
21 private Q_SLOTS:
22 void testCopyFromDocument();
23
24 private:
>>> CID 350242: Uninitialized members (UNINIT_CTOR)
>>> The compiler-generated constructor for this class does not initialize "m_doc".
25 KisDocument *m_doc;
26 };
27
** CID 350241: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/plugins/tools/basictools/kis_tool_colorsampler.cc: 42 in KisToolColorSampler::KisToolColorSampler(KoCanvasBase *)()
________________________________________________________________________________________________________
*** CID 350241: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/plugins/tools/basictools/kis_tool_colorsampler.cc: 42 in KisToolColorSampler::KisToolColorSampler(KoCanvasBase *)()
36
37 KisToolColorSampler::KisToolColorSampler(KoCanvasBase *canvas)
38 : KisTool(canvas, KisCursor::samplerCursor()),
39 m_config(new KisToolUtils::ColorSamplerConfig)
40 {
41 setObjectName("tool_colorsampler");
>>> CID 350241: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "m_isOutlineEnabled" is not initialized in this constructor nor in any functions that it calls.
42 }
43
44 KisToolColorSampler::~KisToolColorSampler()
45 {
46 if (m_isActivated) {
47 m_config->save();
** CID 350240: (CHECKED_RETURN)
/home/tymon/kritadev/krita/libs/psd/psd_additional_layer_info_block.cpp: 159 in PsdAdditionalLayerInfoBlock::readImpl<(psd_byte_order)0>(QIODevice &)()
/home/tymon/kritadev/krita/libs/psd/psd_additional_layer_info_block.cpp: 159 in PsdAdditionalLayerInfoBlock::readImpl<(psd_byte_order)1>(QIODevice &)()
________________________________________________________________________________________________________
*** CID 350240: (CHECKED_RETURN)
/home/tymon/kritadev/krita/libs/psd/psd_additional_layer_info_block.cpp: 159 in PsdAdditionalLayerInfoBlock::readImpl<(psd_byte_order)0>(QIODevice &)()
153 } else if (key == "luni") {
154 // get the unicode layer name
155 unicodeLayerName = readUnicodeString<byteOrder>(io);
156 dbgFile << "unicodeLayerName" << unicodeLayerName;
157 } else if (key == "lyid") {
158 quint32 id;
>>> CID 350240: (CHECKED_RETURN)
>>> Calling "psdread" without checking return value (as is done elsewhere 16 out of 19 times).
159 psdread<byteOrder>(io, id);
160 dbgFile << "layer ID:" << id;
161 } else if (key == "lfx2" || key == "lfxs") {
162 // lfxs is a special variant of layer styles for group layers
163 layerStyleXml = KisAslReader::readLfx2PsdSection(io, byteOrder);
164 } else if (key == "Patt" || key == "Pat2" || key == "Pat3") {
/home/tymon/kritadev/krita/libs/psd/psd_additional_layer_info_block.cpp: 159 in PsdAdditionalLayerInfoBlock::readImpl<(psd_byte_order)1>(QIODevice &)()
153 } else if (key == "luni") {
154 // get the unicode layer name
155 unicodeLayerName = readUnicodeString<byteOrder>(io);
156 dbgFile << "unicodeLayerName" << unicodeLayerName;
157 } else if (key == "lyid") {
158 quint32 id;
>>> CID 350240: (CHECKED_RETURN)
>>> Calling "psdread" without checking return value (as is done elsewhere 35 out of 36 times).
159 psdread<byteOrder>(io, id);
160 dbgFile << "layer ID:" << id;
161 } else if (key == "lfx2" || key == "lfxs") {
162 // lfxs is a special variant of layer styles for group layers
163 layerStyleXml = KisAslReader::readLfx2PsdSection(io, byteOrder);
164 } else if (key == "Patt" || key == "Pat2" || key == "Pat3") {
** CID 350239: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 350239: Null pointer dereferences (FORWARD_NULL)
/home/tymon/kritadev/krita/libs/ui/kis_animation_importer.cpp: 148 in KisAnimationImporter::import(QStringList, int, int, bool, bool, int, bool, QList<int>)()
142 if (cfg.trimFramesImport()) {
143 importDoc->image()->projection()->crop(m_d->image->bounds());
144 }
145 importDoc->image()->projection()->purgeDefaultPixels();
146
147 if (!autoAddHoldframes) {
>>> CID 350239: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "layerRasterChannelPair.second" to "importFrame", which dereferences it.
148 layerRasterChannelPair.second->importFrame(frame, importDoc->image()->projection(), NULL); // as first frame added will go to second slot i.e #1 instead of #0
149 } else {
150 pos = 0;
151
152 while ((pos = rx.indexIn(file, pos)) != -1) {
153 fileNumberRxList << rx.cap(1);
** CID 350238: API usage errors (SWAPPED_ARGUMENTS)
________________________________________________________________________________________________________
*** CID 350238: API usage errors (SWAPPED_ARGUMENTS)
/home/tymon/kritadev/krita/libs/ui/kis_popup_palette.cpp: 1081 in KisPopupPalette::calculateColorIndex(QPointF, int) const()
1075 if (numColors < 1) {
1076 return -1;
1077 }
1078 // relative to palette center
1079 QPointF relPosition = position - QPointF(0.5 * m_popupPaletteSize, 0.5 * m_popupPaletteSize);
1080
>>> CID 350238: API usage errors (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the call to "qAtan2" do not match the ordering of the parameters:
* "relPosition.x()" is passed to "y".
* "relPosition.y()" is passed to "x".
1081 qreal angle = qAtan2(relPosition.x(), relPosition.y()) + M_PI/numColors;
1082 if (angle < 0) {
1083 angle += 2 * M_PI;
1084 }
1085
1086 int index = floor(angle * numColors / (2 * M_PI));
** CID 350237: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 350237: Null pointer dereferences (FORWARD_NULL)
/home/tymon/kritadev/krita/plugins/paintops/libpaintop/kis_brush_based_paintop_settings.cpp: 252 in KisBrushBasedPaintOpSettings::uniformProperties(KisPinnedSharedPtr<KisPaintOpSettings>, QPointer<KisPaintOpPresetUpdateProxy>)::[lambda(KisUniformPaintOpProperty *) (instance 3)]::operator ()(KisUniformPaintOpProperty *) const()
246
247 prop->setReadCallback(
248 [](KisUniformPaintOpProperty *prop) {
249 KisBrushBasedPaintOpSettings *s =
250 dynamic_cast<KisBrushBasedPaintOpSettings*>(prop->settings().data());
251
>>> CID 350237: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "s" to "autoSpacingActive", which dereferences it.
252 prop->setValue(s->autoSpacingActive());
253 });
254 prop->setWriteCallback(
255 [](KisUniformPaintOpProperty *prop) {
256 KisBrushBasedPaintOpSettings *s =
257 dynamic_cast<KisBrushBasedPaintOpSettings*>(prop->settings().data());
** CID 350236: Uninitialized variables (UNINIT)
/home/tymon/kritadev/krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp: 224 in KisDuplicateOpSettings::uniformProperties(KisPinnedSharedPtr<KisPaintOpSettings>, QPointer<KisPaintOpPresetUpdateProxy>)::[lambda(KisUniformPaintOpProperty *) (instance 3)]::operator ()(KisUniformPaintOpProperty *) const()
________________________________________________________________________________________________________
*** CID 350236: Uninitialized variables (UNINIT)
/home/tymon/kritadev/krita/plugins/paintops/defaultpaintops/duplicate/kis_duplicateop_settings.cpp: 224 in KisDuplicateOpSettings::uniformProperties(KisPinnedSharedPtr<KisPaintOpSettings>, QPointer<KisPaintOpPresetUpdateProxy>)::[lambda(KisUniformPaintOpProperty *) (instance 3)]::operator ()(KisUniformPaintOpProperty *) const()
218
219 prop->setReadCallback(
220 [](KisUniformPaintOpProperty *prop) {
221 KisDuplicateOptionProperties option;
222 option.readOptionSetting(prop->settings().data());
223
>>> CID 350236: Uninitialized variables (UNINIT)
>>> Using uninitialized value "option.duplicate_move_source_point" when calling "QVariant".
224 prop->setValue(option.duplicate_move_source_point);
225 });
226 prop->setWriteCallback(
227 [](KisUniformPaintOpProperty *prop) {
228 KisDuplicateOptionProperties option;
229 option.readOptionSetting(prop->settings().data());
** CID 350235: Error handling issues (UNCAUGHT_EXCEPT)
/home/tymon/kritadev/krita/libs/ui/dialogs/kis_dlg_image_properties.cc: 134 in KisDlgImageProperties::~KisDlgImageProperties()()
________________________________________________________________________________________________________
*** CID 350235: Error handling issues (UNCAUGHT_EXCEPT)
/home/tymon/kritadev/krita/libs/ui/dialogs/kis_dlg_image_properties.cc: 134 in KisDlgImageProperties::~KisDlgImageProperties()()
128 SIGNAL(colorSpaceChanged(const KoColorSpace*)),
129 SLOT(slotColorSpaceChanged(const KoColorSpace*)));
130
131 slotColorSpaceChanged(m_image->colorSpace());
132 }
133
>>> CID 350235: Error handling issues (UNCAUGHT_EXCEPT)
>>> An exception of type "KisAssertException" is thrown but the exception specification "noexcept" doesn't allow it to be thrown. This will result in a call to terminate().
134 KisDlgImageProperties::~KisDlgImageProperties()
135 {
136 if (m_compressor->isActive()) {
137 m_compressor->stop();
138 setCurrentColor();
139 }
** CID 350234: Performance inefficiencies (PASS_BY_VALUE)
/home/tymon/kritadev/krita/plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.cpp: 835 in InplaceTransformStrokeStrategy::reapplyTransform(ToolTransformArgs, QVector<KisStrokeJobData *> &, int, bool)::[lambda() (instance 1)]::operator ()() const()
________________________________________________________________________________________________________
*** CID 350234: Performance inefficiencies (PASS_BY_VALUE)
/home/tymon/kritadev/krita/plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.cpp: 835 in InplaceTransformStrokeStrategy::reapplyTransform(ToolTransformArgs, QVector<KisStrokeJobData *> &, int, bool)::[lambda() (instance 1)]::operator ()() const()
829 KisBatchNodeUpdateSP updateData(new KisBatchNodeUpdate());
830
831 CommandGroup commandGroup =
832 levelOfDetail > 0 ? TransformLod : Transform;
833
834 KritaUtils::addJobBarrier(mutatedJobs, levelOfDetail,
>>> CID 350234: Performance inefficiencies (PASS_BY_VALUE)
>>> Capturing variable "args" of type "ToolTransformArgs" (size 456 bytes) by value, which exceeds the medium threshold of 256 bytes.
835 [this, args, levelOfDetail, updateData, useHoldUI, commandGroup]() {
836
837 // it has its own dirty requests blocking inside
838 undoTransformCommands(levelOfDetail);
839
840 if (useHoldUI) {
** CID 350233: Uninitialized variables (UNINIT)
/home/tymon/kritadev/krita/plugins/paintops/spray/kis_spray_paintop_settings.cpp: 183 in KisSprayPaintOpSettings::uniformProperties(KisPinnedSharedPtr<KisPaintOpSettings>, QPointer<KisPaintOpPresetUpdateProxy>)::[lambda(const KisUniformPaintOpProperty *) (instance 2)]::operator ()(const KisUniformPaintOpProperty *) const()
________________________________________________________________________________________________________
*** CID 350233: Uninitialized variables (UNINIT)
/home/tymon/kritadev/krita/plugins/paintops/spray/kis_spray_paintop_settings.cpp: 183 in KisSprayPaintOpSettings::uniformProperties(KisPinnedSharedPtr<KisPaintOpSettings>, QPointer<KisPaintOpPresetUpdateProxy>)::[lambda(const KisUniformPaintOpProperty *) (instance 2)]::operator ()(const KisUniformPaintOpProperty *) const()
177 option.writeOptionSetting(prop->settings().data());
178 });
179 prop->setIsVisibleCallback(
180 [](const KisUniformPaintOpProperty *prop) {
181 KisSprayOptionProperties option;
182 option.readOptionSetting(prop->settings().data());
>>> CID 350233: Uninitialized variables (UNINIT)
>>> Using uninitialized value "option.useDensity".
183 return option.useDensity;
184 });
185 QObject::connect(updateProxy, SIGNAL(sigSettingsChanged()), prop, SLOT(requestReadValue()));
186 prop->requestReadValue();
187 props << toQShared(prop);
188 }
** CID 350232: Control flow issues (MISSING_BREAK)
/home/tymon/kritadev/krita/plugins/color/lcms2engine/colorprofiles/LcmsColorProfileContainer.cpp: 591 in LcmsColorProfileContainer::transferFunction(TransferCharacteristics)()
________________________________________________________________________________________________________
*** CID 350232: Control flow issues (MISSING_BREAK)
/home/tymon/kritadev/krita/plugins/color/lcms2engine/colorprofiles/LcmsColorProfileContainer.cpp: 591 in LcmsColorProfileContainer::transferFunction(TransferCharacteristics)()
585 cmsFloat64Number log_100[5] = {1.0, 10, 2.0, -2.0, 0.0};
586 cmsFloat64Number log_100_sqrt[5] = {1.0, 10, 2.5, -2.5, 0.0};
587
588 switch (transferFunction) {
589 case TRC_IEC_61966_2_4:
590 // Not possible in ICC due to lack of a*pow(bX+c,y) construct.
>>> CID 350232: Control flow issues (MISSING_BREAK)
>>> The case for value "TRC_ITU_R_BT_1361" is not terminated by a "break" statement.
591 case TRC_ITU_R_BT_1361:
592 // This is not possible in ICC due to lack of a*pow(bX+c,y) construct.
593 qWarning() << "Neither IEC 61966 2-4 nor Bt. 1361 are supported, returning a rec 709 curve.";
594 case TRC_ITU_R_BT_709_5:
595 case TRC_ITU_R_BT_601_6:
596 case TRC_ITU_R_BT_2020_2_10bit:
** CID 350231: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/resources/KoResourceBundleManifest.h: 25 in KoResourceBundleManifest::ResourceReference::ResourceReference()()
________________________________________________________________________________________________________
*** CID 350231: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/resources/KoResourceBundleManifest.h: 25 in KoResourceBundleManifest::ResourceReference::ResourceReference()()
19 class KRITARESOURCES_EXPORT KoResourceBundleManifest
20 {
21 public:
22
23 struct ResourceReference {
24
>>> CID 350231: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "resourceId" is not initialized in this constructor nor in any functions that it calls.
25 ResourceReference() {}
26
27 ResourceReference(const QString &_resourcePath, const QList<QString> &_tagList, const QString &_fileTypeName,
28 const QString &_md5, const int _resourceId = -1, const QString _filenameInBundle = "") {
29 resourcePath = _resourcePath;
30 tagList = _tagList;
** CID 350230: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp: 62 in MoveStrokeStrategy::MoveStrokeStrategy(const MoveStrokeStrategy&, int)()
________________________________________________________________________________________________________
*** CID 350230: Uninitialized members (UNINIT_CTOR)
/home/tymon/kritadev/krita/libs/ui/tool/strokes/move_stroke_strategy.cpp: 62 in MoveStrokeStrategy::MoveStrokeStrategy(const MoveStrokeStrategy&, int)()
56 m_dirtyRect(rhs.m_dirtyRect),
57 m_dirtyRects(rhs.m_dirtyRects),
58 m_updatesEnabled(rhs.m_updatesEnabled),
59 m_transformMaskData()
60 {
61 KIS_SAFE_ASSERT_RECOVER_NOOP(rhs.m_transformMaskData.empty());
>>> CID 350230: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "keyframeCommand" is not initialized in this constructor nor in any functions that it calls.
62 }
63 void MoveStrokeStrategy::saveInitialNodeOffsets(KisNodeSP node)
64 {
65 if (!m_blacklistedNodes.contains(node)) {
66 m_initialNodeOffsets.insert(node, QPoint(node->x(), node->y()));
67 }
** CID 350229: Null pointer dereferences (FORWARD_NULL)
________________________________________________________________________________________________________
*** CID 350229: Null pointer dereferences (FORWARD_NULL)
/home/tymon/kritadev/krita/libs/ui/widgets/gradient/KisSegmentGradientSlider.cpp: 534 in KisSegmentGradientSlider::mouseMoveEvent(QMouseEvent *)()
528 );
529 } else {
530 if (!previousSegment) {
531 nextSegment->setStartOffset(0.0);
532 }
533 if (!nextSegment) {
>>> CID 350229: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "previousSegment" to "setEndOffset", which dereferences it.
534 previousSegment->setEndOffset(1.0);
535 }
536 }
537 }
538 emit selectedHandleChanged();
539 emit updateRequested();
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yoiVvSSc0Ywjss83d7yOEUgcCB0VGS755ZaA-2FhoVtwbuw-3D-3DcSXj_9IaX5f-2FHpKL9E6YDsrt7GXrayr4Tk6CKCUhJvkNHrt4AvRMwYbW00fM1WR3AqjOnTP8ssm5qGF1HXkjLHRt-2BYTa0uciOQEDcKCl7B1NtaJCggCRFHCDexq191uFYB3U4UL1hZX2KdnfstA4FiPjfQ4gRNbVvloMdmgHlb17aIeUXKuAzk83-2Bgakf5sndRGJSFLpjS-2F48l0pUp65uTDaQkg-3D-3D
More information about the kimageshop
mailing list