From 721d6641360aa9f3a7e19cd5ec28bf118cd4ce07 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 17 Nov 2024 21:57:03 -0800 Subject: [PATCH] Fix compiler warnings --- rtengine/FTblockDN.cc | 4 ++-- rtengine/iplocallab.cc | 3 ++- rtengine/ipwavelet.cc | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 4d8750929..69b6b55c0 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -755,8 +755,8 @@ BENCHFUN int min_numblox_W = ceil((static_cast((MIN(imwidth, ((numtiles_W - 1) * tileWskip) + tilewidth)) - ((numtiles_W - 1) * tileWskip))) / (offset)) + 2 * blkrad; // these are needed only for creation of the plans and will be freed before entering the parallel loop - fftwf_plan plan_forward_blox[2]; - fftwf_plan plan_backward_blox[2]; + fftwf_plan plan_forward_blox[2] = {}; + fftwf_plan plan_backward_blox[2] = {}; if (denoiseLuminance) { float *Lbloxtmp = reinterpret_cast(fftwf_malloc(max_numblox_W * TS * TS * sizeof(float))); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 13f974d1a..18227596b 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -6728,7 +6728,8 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int bdecomp.reconstruct(tmpab.b[0]); } - float meanfab1, fab1, maxfab1; + float meanfab1, fab1; + float maxfab1 = 0.f; std::unique_ptr buforig; buforig.reset(new LabImage(bfw, bfh)); #ifdef _OPENMP diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index 536b89295..50b818013 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -224,7 +224,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; const int imheight = lab->H, imwidth = lab->W; - int levwavL; + int levwavL = 0; //Flat curve for H=f(H) in final touchup for guidedfilter FlatCurve* wavguidCurve = new FlatCurve(params->wavelet.wavguidcurve); //curve H=f(H) bool wavguidutili = false; @@ -258,6 +258,8 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const cp.complex = 0; } else if (params->wavelet.complexmethod == "expert") { cp.complex = 1; + } else { + cp.complex = 0; }