Skip to content

Commit

Permalink
Merge pull request #784 from guitargeek/112x_warnings_1
Browse files Browse the repository at this point in the history
Fix gcc compiler warnings
  • Loading branch information
amarini authored Aug 23, 2022
2 parents f085fb7 + 95b1982 commit da84905
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/BayesianToyMC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ std::pair<double,double> BayesianToyMC::priorPredictiveDistribution(RooStats::Mo
if (verbose > 2) { std::cout << "\n\n==== POINT "<< t << ","<<i<<" ====" << std::endl; params->Print("V"); }
double nllVal = nll->getVal();
if (offset) {
if (isnan(*offset)) *offset = nllVal;
if (std::isnan(*offset)) *offset = nllVal;
nllVal -= *offset;
}
if (verbose > 1) std::cout << "nll[" << t << ","<<i<<"] = " << nllVal << ", p = " << std::exp(-nllVal) << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion src/CascadeMinimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ bool CascadeMinimizer::multipleMinimize(const RooArgSet &reallyCleanParameters,
for (std::vector<int>::iterator it = cit.begin();
it!=cit.end(); it++){

isValidCombo *= (contributingIndeces)[pdfIndex][*it];
isValidCombo &= (contributingIndeces)[pdfIndex][*it];
if (!isValidCombo ) /*&& runShortCombinations)*/ continue;

fPdf = (RooCategory*) pdfCategoryIndeces.at(pdfIndex);
Expand Down
1 change: 0 additions & 1 deletion src/HybridNew.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,6 @@ void HybridNew::updateGridDataFC(RooWorkspace *w, RooStats::ModelConfig *mc_s, R
}

std::pair<double,double> HybridNew::updateGridPoint(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, std::map<double, RooStats::HypoTestResult *>::iterator point) {
typedef std::pair<double,double> CLs_t;
bool isProfile = (testStat_ == "LHC" || testStat_ == "LHCFC" || testStat_ == "Profile");
if (point->first == 0 && CLs_) return std::pair<double,double>(1,0);
RooArgSet poi(*mc_s->GetParametersOfInterest());
Expand Down
2 changes: 1 addition & 1 deletion src/MultiDimFit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ void MultiDimFit::splitGridPoints(const std::string& s, std::vector<unsigned int
boost::split(strPoints, s, boost::is_any_of(","));

// convert to int and add
for (const auto strPoint : strPoints) {
for (const auto& strPoint : strPoints) {
points.push_back(std::stoul(strPoint));
}
}
7 changes: 5 additions & 2 deletions src/th1fmorph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,11 @@ TH1_t *th1fmorph_(const char *chname,

//......Clean up the temporary arrays we allocated.

delete sigdis1; delete sigdis2;
delete sigdisn; delete xdisn; delete sigdisf;
delete[] sigdis1;
delete[] sigdis2;
delete[] sigdisn;
delete[] xdisn;
delete[] sigdisf;

//......All done, return the result.

Expand Down

0 comments on commit da84905

Please sign in to comment.