Fix some coverity issues

This commit is contained in:
Ingo Weyrich 2019-08-09 15:45:52 +02:00
parent 63abfb4d66
commit 9293e8e69b
4 changed files with 7 additions and 7 deletions

View File

@ -176,9 +176,11 @@ void PipetteBuffer::getPipetteData(int x, int y, const int squareSize)
} }
} }
if (dataProvider) {
dataProvider->setPipetteVal1(-1.f); dataProvider->setPipetteVal1(-1.f);
dataProvider->setPipetteVal2(-1.f); dataProvider->setPipetteVal2(-1.f);
dataProvider->setPipetteVal3(-1.f); dataProvider->setPipetteVal3(-1.f);
}
} }
} }

View File

@ -23,7 +23,7 @@
using namespace rtengine; using namespace rtengine;
using namespace rtengine::procparams; using namespace rtengine::procparams;
RGBCurves::RGBCurves () : FoldableToolPanel(this, "rgbcurves", M("TP_RGBCURVES_LABEL"), false, true) RGBCurves::RGBCurves () : FoldableToolPanel(this, "rgbcurves", M("TP_RGBCURVES_LABEL"), false, true), lastLumamode(false)
{ {
lumamode = Gtk::manage (new Gtk::CheckButton (M("TP_RGBCURVES_LUMAMODE"))); lumamode = Gtk::manage (new Gtk::CheckButton (M("TP_RGBCURVES_LUMAMODE")));

View File

@ -39,8 +39,6 @@ RTImage::RTImage () {}
RTImage::RTImage (RTImage &other) : surface(other.surface), pixbuf(other.pixbuf) RTImage::RTImage (RTImage &other) : surface(other.surface), pixbuf(other.pixbuf)
{ {
dpiBack = other.dpiBack;
scaleBack = other.scaleBack;
if (pixbuf) { if (pixbuf) {
set(pixbuf); set(pixbuf);
} else if (surface) { } else if (surface) {

View File

@ -220,7 +220,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadImage(const Glib::ustring &fn
GError **error = nullptr; GError **error = nullptr;
RsvgHandle *handle = rsvg_handle_new_from_data((unsigned const char*)updatedSVG.c_str(), updatedSVG.length(), error); RsvgHandle *handle = rsvg_handle_new_from_data((unsigned const char*)updatedSVG.c_str(), updatedSVG.length(), error);
if (handle == nullptr) { if (error && !handle) {
std::cerr << "ERROR: Can't use the provided data for \"" << fname << "\" to create a RsvgHandle:" << std::endl std::cerr << "ERROR: Can't use the provided data for \"" << fname << "\" to create a RsvgHandle:" << std::endl
<< Glib::ustring((*error)->message) << std::endl; << Glib::ustring((*error)->message) << std::endl;
Cairo::RefPtr<Cairo::ImageSurface> surf = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, 10, 10); Cairo::RefPtr<Cairo::ImageSurface> surf = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, 10, 10);