Skip to content

Commit

Permalink
Fix cppcheck issues. refs #3868
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcampbell committed Jan 4, 2012
1 parent fa69bbf commit ee9a563
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/FindCppcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if(CPPCHECK_EXECUTABLE)
endif()

mark_as_advanced(CPPCHECK_EXECUTABLE)
set ( CPPCHECK_ARGS "--enable=all" CACHE STRING "Arguments for running cppcheck" )
set ( CPPCHECK_ARGS "--enable=all --inline-suppr " CACHE STRING "Arguments for running cppcheck" )
set ( CPPCHECK_NUM_THREADS 0 CACHE STRING "Number of threads to use when running cppcheck" )
set ( CPPCHECK_GENERATE_XML OFF CACHE BOOL "Generate xml output files from cppcheck" )

Expand Down
3 changes: 2 additions & 1 deletion Code/Mantid/Framework/DataHandling/src/CompressEvents.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*WIKI*
/*WIKI*
Expand Down Expand Up @@ -101,6 +101,7 @@ void CompressEvents::exec()

// Loop over the histograms (detector spectra)
// Don't parallelize the loop if we are going to parallelize each event list.
// cppcheck-suppress syntaxError
PRAGMA_OMP( parallel for schedule(dynamic) if (!parallel_in_each) )
for (int i = 0; i < noSpectra; ++i)
{
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Framework/DataHandling/src/LoadSpec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ namespace Mantid
void LoadSpec::exec()
{
std::string filename = getProperty("Filename");
std::string separator = " "; //separator can be 1 or more spaces
std::ifstream file(filename.c_str());
//std::string separator = " "; //separator can be 1 or more spaces
std::ifstream file(filename.c_str());

file.seekg (0, std::ios::end);
Progress progress(this,0,1,static_cast<int>(file.tellg()));
Expand All @@ -126,8 +126,8 @@ namespace Mantid
//size_t iLine=0; // line number
int nSpectra = 0;
int nBins = 0; //number of rows
std::string first_character;
std::string axes_infos;
//std::string first_character;
//std::string axes_infos;

//bool numeric = true;
std::vector<double> input;
Expand Down
1 change: 0 additions & 1 deletion Code/Mantid/Framework/DataHandling/src/SaveGSS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ namespace Mantid
}

std::string filename = getProperty("Filename");
std::string inputWSName = getProperty("InputWorkspace");

std::size_t pos = filename.find_first_of(".");
std::string ext;
Expand Down

0 comments on commit ee9a563

Please sign in to comment.