Fix some coverity issues
This commit is contained in:
parent
31d1f2f52b
commit
c4f27b2c13
@ -180,11 +180,10 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_)
|
||||
CameraConst *
|
||||
CameraConst::parseEntry(void *cJSON_, const char *make_model)
|
||||
{
|
||||
CameraConst *cc = nullptr;
|
||||
cJSON *js, *ji, *jranges;
|
||||
js = (cJSON *)cJSON_;
|
||||
|
||||
cc = new CameraConst;
|
||||
CameraConst *cc = new CameraConst;
|
||||
cc->make_model = Glib::ustring(make_model);
|
||||
|
||||
ji = cJSON_GetObjectItem(js, "dcraw_matrix");
|
||||
|
@ -1225,8 +1225,7 @@ cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams:
|
||||
}
|
||||
|
||||
// Calculate output profile's rTRC gTRC bTRC
|
||||
cmsToneCurve* GammaTRC = nullptr;
|
||||
GammaTRC = cmsBuildParametricToneCurve(nullptr, 5, Parameters);
|
||||
cmsToneCurve* GammaTRC = cmsBuildParametricToneCurve(nullptr, 5, Parameters);
|
||||
cmsWriteTag(outputProfile, cmsSigRedTRCTag,(void*)GammaTRC );
|
||||
cmsWriteTag(outputProfile, cmsSigGreenTRCTag,(void*)GammaTRC );
|
||||
cmsWriteTag(outputProfile, cmsSigBlueTRCTag,(void*)GammaTRC );
|
||||
|
@ -150,7 +150,7 @@ class ImProcFunctions
|
||||
}
|
||||
|
||||
double rd;
|
||||
double yr[4];
|
||||
double yr[4] = {0.0};
|
||||
|
||||
for (int k = ys, kx = 0; k < ys + 4; k++, kx++) {
|
||||
rd = 0.0;
|
||||
|
@ -690,7 +690,7 @@ void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat*
|
||||
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
|
||||
|
||||
for (int y = 0; y < transformed->getHeight(); y++) {
|
||||
double vig_y_d = (double) (y + cy) - vig_h2 ;
|
||||
double vig_y_d = applyVignetting ? (double) (y + cy) - vig_h2 : 0.0;
|
||||
|
||||
for (int x = 0; x < transformed->getWidth(); x++) {
|
||||
double factor = 1.0;
|
||||
|
@ -819,6 +819,7 @@ void DirPyrDenoiseParams::setDefaults()
|
||||
enhance = false;
|
||||
median = false;
|
||||
autochroma = false;
|
||||
perform = false;
|
||||
luma = 0;
|
||||
passes = 1;
|
||||
dmethod = "Lab";
|
||||
|
@ -190,8 +190,7 @@ bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath
|
||||
}
|
||||
|
||||
// walking through the directory
|
||||
Glib::Dir* dir = nullptr;
|
||||
dir = new Glib::Dir (realPath);
|
||||
Glib::Dir* dir = new Glib::Dir (realPath);
|
||||
|
||||
for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) {
|
||||
currDir = *i;
|
||||
|
@ -36,7 +36,7 @@ using namespace rtengine;
|
||||
|
||||
CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow)
|
||||
: ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false),
|
||||
fitZoomEnabled(true), fitZoom(false), /*isLowUpdatePriority(isLowUpdatePriority_),*/ hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")),
|
||||
fitZoomEnabled(true), fitZoom(false), cursor_type(CSArrow), /*isLowUpdatePriority(isLowUpdatePriority_),*/ hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")),
|
||||
backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3),
|
||||
upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0),
|
||||
imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(nullptr),
|
||||
@ -1619,8 +1619,8 @@ void CropWindow::expose (Cairo::RefPtr<Cairo::Context> cr)
|
||||
|
||||
const int hlThreshold = options.highlightThreshold;
|
||||
const int shThreshold = options.shadowThreshold;
|
||||
const float ShawdowFac = 64 / (options.shadowThreshold + 1);
|
||||
const float HighlightFac = 64 / (256 - options.highlightThreshold);
|
||||
const float ShawdowFac = 64.f / (options.shadowThreshold + 1);
|
||||
const float HighlightFac = 64.f / (256 - options.highlightThreshold);
|
||||
const bool showclippedAny = (!showR && !showG && !showB && !showL); // will show clipping if any of RGB chanels is clipped
|
||||
|
||||
#ifdef _OPENMP
|
||||
|
@ -197,8 +197,11 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd
|
||||
remoteDrag = false;
|
||||
selected = DCT_Linear;
|
||||
bottomBarCP = nullptr;
|
||||
bottomBarCId = 0;
|
||||
leftBarCP = nullptr;
|
||||
leftBarCId = 0;
|
||||
curveCP = nullptr;
|
||||
curveCId = 0;
|
||||
relatedWidget = nullptr;
|
||||
expandRelatedWidget = true;
|
||||
|
||||
|
@ -395,7 +395,7 @@ void CurveEditorGroup::setUnChanged (bool uc, CurveEditor* ce)
|
||||
}
|
||||
}
|
||||
|
||||
CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename("")
|
||||
CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename(""), valLinear(0), valUnchanged(0), parent(nullptr)
|
||||
{
|
||||
leftBar = nullptr;
|
||||
bottomBar = nullptr;
|
||||
|
@ -25,7 +25,7 @@
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
DarkFrame::DarkFrame () : FoldableToolPanel(this, "darkframe", M("TP_DARKFRAME_LABEL"))
|
||||
DarkFrame::DarkFrame () : FoldableToolPanel(this, "darkframe", M("TP_DARKFRAME_LABEL")), dfChanged(false), lastDFauto(false), dfp(nullptr), israw(true)
|
||||
{
|
||||
hbdf = Gtk::manage(new Gtk::HBox());
|
||||
hbdf->set_spacing(4);
|
||||
|
@ -226,7 +226,7 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview)
|
||||
|
||||
int PreviewModePanel::GetbackColor()
|
||||
{
|
||||
int backColor;
|
||||
int backColor = 0;
|
||||
|
||||
if (backColor0->get_active ()) {
|
||||
backColor = 0;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "cursormanager.h"
|
||||
|
||||
PreviewWindow::PreviewWindow () : previewHandler(nullptr), mainCropWin(nullptr), imageArea(nullptr), imgX(0), imgY(0), imgW(0), imgH(0),
|
||||
zoom(0.0), isMoving(false), needsUpdate(false), cursor_type(CSUndefined)
|
||||
zoom(0.0), press_x(0), press_y(0), isMoving(false), needsUpdate(false), cursor_type(CSUndefined)
|
||||
|
||||
{
|
||||
set_name("PreviewWindow");
|
||||
|
Loading…
x
Reference in New Issue
Block a user