Skip to content

Commit

Permalink
Remove suppressions no longer required by cppcheck 1.63
Browse files Browse the repository at this point in the history
Refs #8940
  • Loading branch information
martyngigg committed Feb 7, 2014
1 parent 4940813 commit 4d88a39
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions Code/Mantid/Build/CMake/CppCheck_Suppressions.txt
Expand Up @@ -3,8 +3,6 @@
//exceptNew:src/file1.cpp

// suppress in all files - BE CAREFULL not to leave trailing spaces after the rule id. or empty lines
// This finds false positives where private member variable names reused by inheriting classes
duplInheritedMember
// For a library this is not a problem per se
unusedFunction
// cppcheck has problems handling the number of pre-processor definitions used in the DLL_EXPORTs
Expand Down
Expand Up @@ -603,7 +603,6 @@ void NormaliseToMonitor::normaliseBinByBin(const API::MatrixWorkspace_sptr& inpu

// Calculate result and store in local variable to avoid overwriting original data if
// output workspace is same as one of the input ones
// cppcheck-suppress zerodivcond
const double newY = leftY/rightY;

if (fabs(rightY)>1.0e-12 && fabs(newY)>1.0e-12)
Expand Down
2 changes: 0 additions & 2 deletions Code/Mantid/Framework/CurveFitting/src/FitPowderDiffPeaks.cpp
Expand Up @@ -2966,8 +2966,6 @@ namespace CurveFitting
// Calcualte d-spacing
d_h = m_unitCell.d(hkl[0], hkl[1], hkl[2]);
// d_h = calCubicDSpace(latticesize, hkl[0], hkl[1], hkl[2]);
// cppcheck complains about the NaN check
// cppcheck-suppress duplicateExpression
if ( (d_h != d_h) || (d_h < -DBL_MAX) || (d_h > DBL_MAX) )
{
stringstream warnss;
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/Kernel/src/Statistics.cpp
Expand Up @@ -279,7 +279,6 @@ namespace Mantid
rfactor.Rp = (sumrpnom/sumrpdenom);
rfactor.Rwp = std::sqrt(sumnom/sumdenom);

// cppcheck-suppress duplicateExpression
if (rfactor.Rwp != rfactor.Rwp)
std::cout << "Rwp is NaN. Denominator = " << sumnom << "; Nominator = " << sumdenom << ". \n";

Expand Down
2 changes: 0 additions & 2 deletions Code/Mantid/Framework/MDAlgorithms/src/FindPeaksMD.cpp
Expand Up @@ -317,8 +317,6 @@ namespace MDAlgorithms

// Calculate a threshold below which a box is too diffuse to be considered a peak.
signal_t thresholdDensity = ws->getBox()->getSignalNormalized() * DensityThresholdFactor * m_densityScaleFactor;
// cppcheck get confused by NaN check
// cppcheck-suppress duplicateExpression
if ((thresholdDensity != thresholdDensity) || (thresholdDensity == std::numeric_limits<double>::infinity())
|| (thresholdDensity == -std::numeric_limits<double>::infinity()))
{
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/MDAlgorithms/src/LoadSQW.cpp
Expand Up @@ -257,7 +257,6 @@ namespace Mantid
parseMetadata(m_fileName);

// Create a new output workspace.
// cppcheck-suppress constStatement
MDEventWorkspace<MDEvent<4>,4>* pWs = new MDEventWorkspace<MDEvent<4>,4>;
Mantid::API::IMDEventWorkspace_sptr ws(pWs);

Expand Down
Expand Up @@ -185,7 +185,6 @@ namespace Mantid
sumSigma += weight;
sumSigmaSqr += weight*weight;

// cppcheck-suppress zerodivcond
avgSigma = sumSigma/step;
if(checkForConvergence(step) && hasConverged(step, sumSigma, sumSigmaSqr, avgSigma))
{
Expand Down
Expand Up @@ -27,17 +27,14 @@ void export_DateAndTime()
.def("totalNanoseconds", &DateAndTime::totalNanoseconds)
.def("setToMinimum", &DateAndTime::setToMinimum)
.def("__str__", &ISO8601StringPlusSpace)
// cppcheck-suppress duplicateExpression
.def(self == self)
// cppcheck-suppress duplicateExpression
.def(self != self)
// cppcheck-suppress duplicateExpression
.def(self < self)
.def(self + int64_t())
.def(self += int64_t())
.def(self - int64_t())
.def(self -= int64_t())
// cppcheck-suppress duplicateExpression
.def(self - self)
;
}
Expand Down
Expand Up @@ -38,14 +38,11 @@ void export_Quat()
.def("len2", &Quat::len2, args("self"), "Returns the square of the 'length' of the quaternion")
.def(self + self)
.def(self += self)
// cppcheck-suppress duplicateExpression
.def(self - self)
.def(self -= self)
.def(self * self)
.def(self *= self)
// cppcheck-suppress duplicateExpression
.def(self == self)
// cppcheck-suppress duplicateExpression
.def(self != self)
.def("__getitem__", (const double&(Quat::*)(int) const)&Quat::operator[], return_value_policy<copy_const_reference>())
.def(boost::python::self_ns::str(self))
Expand Down
Expand Up @@ -26,7 +26,6 @@ void export_V3D()
.def("norm2", &V3D::norm2, "Calculates the squared length of the vector")
.def(self + self)
.def(self += self)
// cppcheck-suppress duplicateExpression
.def(self - self)
.def(self -= self)
.def(self * self)
Expand All @@ -37,9 +36,7 @@ void export_V3D()
.def(self *= int())
.def(self * double())
.def(self *= double())
// cppcheck-suppress duplicateExpression
.def(self < self)
// cppcheck-suppress duplicateExpression
.def(self == self)
.def(self_ns::str(self))
;
Expand Down
Expand Up @@ -79,11 +79,9 @@ void export_VMD()
//----------------------------- special methods --------------------------------
.def("__getitem__", &getItem)
.def("__setitem__", &setItem)
// cppcheck-suppress duplicateExpression
.def(self == self)
.def(self + self)
.def(self += self)
// cppcheck-suppress duplicateExpression
.def(self - self)
.def(self -= self)
.def(self * self)
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Expand Up @@ -14945,7 +14945,6 @@ Folder* ApplicationWindow::appendProject(const QString& fn, Folder* parentFolder

if (fn.contains(".opj", Qt::CaseInsensitive) || fn.contains(".ogm", Qt::CaseInsensitive) ||
fn.contains(".ogw", Qt::CaseInsensitive) || fn.contains(".ogg", Qt::CaseInsensitive))
// cppcheck-suppress unusedScopedObject
ImportOPJ(this, fn);
else{
QFile f(fname);
Expand Down

0 comments on commit 4d88a39

Please sign in to comment.