From 9622da6dc7c3717e90129a5d24788b4c83e2e246 Mon Sep 17 00:00:00 2001 From: Janik Zikovsky <zikovskyjl@ornl.gov> Date: Fri, 17 Dec 2010 16:00:39 +0000 Subject: [PATCH] Refs #1707: Reduced compiler warnings. --- Code/Mantid/API/inc/MantidAPI/IDataFileChecker.h | 2 +- Code/Mantid/DataHandling/inc/MantidDataHandling/LoadAscii.h | 2 +- .../DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h | 2 +- Code/Mantid/DataHandling/inc/MantidDataHandling/LoadGSS.h | 2 +- Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRKH.h | 2 +- Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRaw3.h | 2 +- .../DataHandling/inc/MantidDataHandling/LoadRawHelper.h | 2 +- .../DataHandling/inc/MantidDataHandling/LoadSNSspec.h | 2 +- Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSPE.h | 2 +- .../DataHandling/inc/MantidDataHandling/LoadSpice2D.h | 2 +- Code/Mantid/DataHandling/src/LoadAscii.cpp | 4 ++-- Code/Mantid/DataHandling/src/LoadCanSAS1D.cpp | 2 +- Code/Mantid/DataHandling/src/LoadGSS.cpp | 4 ++-- Code/Mantid/DataHandling/src/LoadRKH.cpp | 2 +- Code/Mantid/DataHandling/src/LoadRaw3.cpp | 2 +- Code/Mantid/DataHandling/src/LoadRawHelper.cpp | 2 +- Code/Mantid/DataHandling/src/LoadSNSspec.cpp | 4 ++-- Code/Mantid/DataHandling/src/LoadSPE.cpp | 2 +- Code/Mantid/DataHandling/src/LoadSpice2D.cpp | 2 +- Code/Mantid/Nexus/inc/MantidNexus/LoadISISNexus2.h | 2 +- Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus.h | 2 +- Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus2.h | 2 +- Code/Mantid/Nexus/inc/MantidNexus/LoadNexusProcessed.h | 2 +- Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h | 2 +- Code/Mantid/Nexus/src/LoadISISNexus2.cpp | 6 +++--- Code/Mantid/Nexus/src/LoadMuonNexus.cpp | 4 ++-- Code/Mantid/Nexus/src/LoadMuonNexus2.cpp | 4 ++-- Code/Mantid/Nexus/src/LoadNexusProcessed.cpp | 2 +- Code/Mantid/Nexus/src/LoadSNSNexus.cpp | 4 ++-- 29 files changed, 37 insertions(+), 37 deletions(-) diff --git a/Code/Mantid/API/inc/MantidAPI/IDataFileChecker.h b/Code/Mantid/API/inc/MantidAPI/IDataFileChecker.h index 30f89f48247..99a9f5af572 100644 --- a/Code/Mantid/API/inc/MantidAPI/IDataFileChecker.h +++ b/Code/Mantid/API/inc/MantidAPI/IDataFileChecker.h @@ -58,7 +58,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling"; } /// quick file check by reading first 100 bytes of the file or by checking the extension - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer)=0; + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer)=0; /// file check by looking at the structure of the data file virtual int fileCheck(const std::string& filePath)=0; diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadAscii.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadAscii.h index d6750503ce3..16e09d0aa4d 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadAscii.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadAscii.h @@ -55,7 +55,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h index 824fdfe87a0..738725b877b 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadCanSAS1D.h @@ -69,7 +69,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadGSS.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadGSS.h index df605f6fb05..f6c9834b636 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadGSS.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadGSS.h @@ -51,7 +51,7 @@ public: virtual const std::string category() const { return "Diffraction"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRKH.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRKH.h index d08e1eb06cd..321b5bccf29 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRKH.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRKH.h @@ -59,7 +59,7 @@ public: /// Algorithm's category for identification virtual const std::string category() const { return "DataHandling"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); private: diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRaw3.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRaw3.h index 9876bd32443..da67145b3c2 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRaw3.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRaw3.h @@ -79,7 +79,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRawHelper.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRawHelper.h index 8d81cf05dc6..d345039a41b 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRawHelper.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadRawHelper.h @@ -65,7 +65,7 @@ namespace Mantid void loadRunParameters(API::MatrixWorkspace_sptr localWorkspace, ISISRAW * const = NULL) const; /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and if this file can be loaded return a value between 1 and 100 virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSNSspec.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSNSspec.h index df192dc4097..93544888c5d 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSNSspec.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSNSspec.h @@ -54,7 +54,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSPE.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSPE.h index ec125e0dc3b..efd8e0fde8b 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSPE.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSPE.h @@ -56,7 +56,7 @@ public: /// Algorithm's category for identification virtual const std::string category() const { return "DataHandling"; } ///checks the file can be loaded by reading 1st 100 bytes and looking at the file extension. - bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and if this file can be loaded return a value between 1 and 100 int fileCheck(const std::string& filePath); private: diff --git a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSpice2D.h b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSpice2D.h index c82eb242ce8..ec9a28f8ea1 100644 --- a/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSpice2D.h +++ b/Code/Mantid/DataHandling/inc/MantidDataHandling/LoadSpice2D.h @@ -66,7 +66,7 @@ namespace Mantid static const int nMonitors = 2; /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/DataHandling/src/LoadAscii.cpp b/Code/Mantid/DataHandling/src/LoadAscii.cpp index 35cfeded6a0..c40a6beec4b 100644 --- a/Code/Mantid/DataHandling/src/LoadAscii.cpp +++ b/Code/Mantid/DataHandling/src/LoadAscii.cpp @@ -172,14 +172,14 @@ namespace Mantid * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadAscii::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) + bool LoadAscii::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bascii(false); (!extn.compare("dat")||!extn.compare("csv")|| extn.compare("txt"))?bascii=true:bascii=false; bool is_ascii (true); - for(int i=0; i<nread; i++) + for(size_t i=0; i<nread; i++) { if (!isascii(header_buffer[i])) is_ascii =false; diff --git a/Code/Mantid/DataHandling/src/LoadCanSAS1D.cpp b/Code/Mantid/DataHandling/src/LoadCanSAS1D.cpp index 5ece66a202f..89fdd3c3e6e 100644 --- a/Code/Mantid/DataHandling/src/LoadCanSAS1D.cpp +++ b/Code/Mantid/DataHandling/src/LoadCanSAS1D.cpp @@ -296,7 +296,7 @@ void LoadCanSAS1D::createLogs(const Poco::XML::Element * const sasEntry, API::Ma * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ -bool LoadCanSAS1D::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) +bool LoadCanSAS1D::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bspice2d(false); diff --git a/Code/Mantid/DataHandling/src/LoadGSS.cpp b/Code/Mantid/DataHandling/src/LoadGSS.cpp index 50c85c85f9d..df3765c08c3 100644 --- a/Code/Mantid/DataHandling/src/LoadGSS.cpp +++ b/Code/Mantid/DataHandling/src/LoadGSS.cpp @@ -191,14 +191,14 @@ void LoadGSS::exec() * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadGSS::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) + bool LoadGSS::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bascii(false); (!extn.compare("txt"))?bascii=true:bascii=false; bool is_ascii (true); - for(int i=0; i<nread; i++) + for(size_t i=0; i<nread; i++) { if (!isascii(header_buffer[i])) is_ascii =false; diff --git a/Code/Mantid/DataHandling/src/LoadRKH.cpp b/Code/Mantid/DataHandling/src/LoadRKH.cpp index 59cd16bca01..8ebc96c66f2 100644 --- a/Code/Mantid/DataHandling/src/LoadRKH.cpp +++ b/Code/Mantid/DataHandling/src/LoadRKH.cpp @@ -196,7 +196,7 @@ void LoadRKH::skipLines(std::istream & strm, int nlines) * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ -bool LoadRKH::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) +bool LoadRKH::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bascii(false); diff --git a/Code/Mantid/DataHandling/src/LoadRaw3.cpp b/Code/Mantid/DataHandling/src/LoadRaw3.cpp index acf548b2439..3a907394a9c 100644 --- a/Code/Mantid/DataHandling/src/LoadRaw3.cpp +++ b/Code/Mantid/DataHandling/src/LoadRaw3.cpp @@ -670,7 +670,7 @@ void LoadRaw3::separateOrexcludeMonitors(DataObjects::Workspace2D_sptr localWork * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ -bool LoadRaw3::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) +bool LoadRaw3::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { return(LoadRawHelper::quickFileCheck(filePath,nread,header_buffer)?true:false); diff --git a/Code/Mantid/DataHandling/src/LoadRawHelper.cpp b/Code/Mantid/DataHandling/src/LoadRawHelper.cpp index 99a159ab377..18995fc2f5d 100644 --- a/Code/Mantid/DataHandling/src/LoadRawHelper.cpp +++ b/Code/Mantid/DataHandling/src/LoadRawHelper.cpp @@ -1025,7 +1025,7 @@ namespace Mantid * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ -bool LoadRawHelper::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) +bool LoadRawHelper::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool braw(false); diff --git a/Code/Mantid/DataHandling/src/LoadSNSspec.cpp b/Code/Mantid/DataHandling/src/LoadSNSspec.cpp index 8f6e03528d7..deb713cd294 100644 --- a/Code/Mantid/DataHandling/src/LoadSNSspec.cpp +++ b/Code/Mantid/DataHandling/src/LoadSNSspec.cpp @@ -179,14 +179,14 @@ namespace Mantid * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadSNSspec::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) + bool LoadSNSspec::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bascii(false); (!extn.compare("txt"))?bascii=true:bascii=false; bool is_ascii (true); - for(int i=0; i<nread; i++) + for(size_t i=0; i<nread; i++) { if (!isascii(header_buffer[i])) is_ascii =false; diff --git a/Code/Mantid/DataHandling/src/LoadSPE.cpp b/Code/Mantid/DataHandling/src/LoadSPE.cpp index 17b9da0b510..c1da56905ff 100644 --- a/Code/Mantid/DataHandling/src/LoadSPE.cpp +++ b/Code/Mantid/DataHandling/src/LoadSPE.cpp @@ -234,7 +234,7 @@ void LoadSPE::reportFormatError(const std::string& what) * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ -bool LoadSPE::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) +bool LoadSPE::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bspe(false); diff --git a/Code/Mantid/DataHandling/src/LoadSpice2D.cpp b/Code/Mantid/DataHandling/src/LoadSpice2D.cpp index b2ee7ea39dc..02c8173a3a5 100644 --- a/Code/Mantid/DataHandling/src/LoadSpice2D.cpp +++ b/Code/Mantid/DataHandling/src/LoadSpice2D.cpp @@ -409,7 +409,7 @@ namespace Mantid * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadSpice2D::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) + bool LoadSpice2D::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bspice2d(false); diff --git a/Code/Mantid/Nexus/inc/MantidNexus/LoadISISNexus2.h b/Code/Mantid/Nexus/inc/MantidNexus/LoadISISNexus2.h index 10840468361..80aa751e5e5 100644 --- a/Code/Mantid/Nexus/inc/MantidNexus/LoadISISNexus2.h +++ b/Code/Mantid/Nexus/inc/MantidNexus/LoadISISNexus2.h @@ -77,7 +77,7 @@ namespace Mantid /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); private: diff --git a/Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus.h b/Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus.h index f585ecf8245..a52e8ee86c4 100644 --- a/Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus.h +++ b/Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus.h @@ -74,7 +74,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); protected: diff --git a/Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus2.h b/Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus2.h index c1e11d75250..7d7bf9469df 100644 --- a/Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus2.h +++ b/Code/Mantid/Nexus/inc/MantidNexus/LoadMuonNexus2.h @@ -74,7 +74,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); private: diff --git a/Code/Mantid/Nexus/inc/MantidNexus/LoadNexusProcessed.h b/Code/Mantid/Nexus/inc/MantidNexus/LoadNexusProcessed.h index 1b598494c04..124276035e9 100644 --- a/Code/Mantid/Nexus/inc/MantidNexus/LoadNexusProcessed.h +++ b/Code/Mantid/Nexus/inc/MantidNexus/LoadNexusProcessed.h @@ -64,7 +64,7 @@ namespace Mantid virtual const std::string category() const { return "DataHandling";} /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h b/Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h index 7f8e99bca26..b9fd77e2193 100644 --- a/Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h +++ b/Code/Mantid/Nexus/inc/MantidNexus/LoadSNSNexus.h @@ -82,7 +82,7 @@ namespace NeXus /// Algorithm's category for identification overriding a virtual method virtual const std::string category() const { return "DataHandling"; } /// do a quick check that this file can be loaded - virtual bool quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer); + virtual bool quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer); /// check the structure of the file and return a value between 0 and 100 of how much this file can be loaded virtual int fileCheck(const std::string& filePath); diff --git a/Code/Mantid/Nexus/src/LoadISISNexus2.cpp b/Code/Mantid/Nexus/src/LoadISISNexus2.cpp index ca579eb1ad6..37eedaa2195 100644 --- a/Code/Mantid/Nexus/src/LoadISISNexus2.cpp +++ b/Code/Mantid/Nexus/src/LoadISISNexus2.cpp @@ -763,7 +763,7 @@ namespace Mantid * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadISISNexus2::quickFileCheck(const std::string& filePath, int nread,unsigned char* header_buffer) + bool LoadISISNexus2::quickFileCheck(const std::string& filePath, size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bnexs(false); @@ -771,12 +771,12 @@ namespace Mantid /* * HDF files have magic cookie 0x0e031301 in the first 4 bytes */ - if ( ((static_cast<size_t>(nread) >= sizeof(unsigned)) && (ntohl(header_buffer_union.u) == 0x0e031301)) || bnexs ) + if ( ((nread >= sizeof(unsigned)) && (ntohl(header_buffer_union.u) == 0x0e031301)) || bnexs ) { //hdf return true; } - else if ( (static_cast<size_t>(nread) >= sizeof(hdf5_signature)) && (!memcmp(header_buffer, hdf5_signature, sizeof(hdf5_signature))) ) + else if ( (nread >= sizeof(hdf5_signature)) && (!memcmp(header_buffer, hdf5_signature, sizeof(hdf5_signature))) ) { //hdf5 return true; diff --git a/Code/Mantid/Nexus/src/LoadMuonNexus.cpp b/Code/Mantid/Nexus/src/LoadMuonNexus.cpp index 5be372e7fb1..b16572eb7da 100644 --- a/Code/Mantid/Nexus/src/LoadMuonNexus.cpp +++ b/Code/Mantid/Nexus/src/LoadMuonNexus.cpp @@ -610,7 +610,7 @@ namespace Mantid * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadMuonNexus::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) + bool LoadMuonNexus::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bnexs(false); @@ -618,7 +618,7 @@ namespace Mantid /* * HDF files have magic cookie 0x0e031301 in the first 4 bytes */ - if ( (nread >= sizeof(unsigned)) && (ntohl(header_buffer_union.u) == 0x0e031301)||bnexs ) + if ( ((nread >= sizeof(unsigned)) && (ntohl(header_buffer_union.u) == 0x0e031301)) || bnexs ) { //hdf return true; diff --git a/Code/Mantid/Nexus/src/LoadMuonNexus2.cpp b/Code/Mantid/Nexus/src/LoadMuonNexus2.cpp index 0c99ce11db5..16289278b37 100644 --- a/Code/Mantid/Nexus/src/LoadMuonNexus2.cpp +++ b/Code/Mantid/Nexus/src/LoadMuonNexus2.cpp @@ -311,7 +311,7 @@ namespace Mantid * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadMuonNexus2::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) + bool LoadMuonNexus2::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bnexs(false); @@ -319,7 +319,7 @@ namespace Mantid /* * HDF files have magic cookie 0x0e031301 in the first 4 bytes */ - if ( (nread >= sizeof(unsigned)) && (ntohl(header_buffer_union.u) == 0x0e031301)||bnexs ) + if ( ((nread >= sizeof(unsigned)) && (ntohl(header_buffer_union.u) == 0x0e031301)) || bnexs ) { //hdf return true; diff --git a/Code/Mantid/Nexus/src/LoadNexusProcessed.cpp b/Code/Mantid/Nexus/src/LoadNexusProcessed.cpp index e4e50cecd21..88942fee386 100644 --- a/Code/Mantid/Nexus/src/LoadNexusProcessed.cpp +++ b/Code/Mantid/Nexus/src/LoadNexusProcessed.cpp @@ -1226,7 +1226,7 @@ int LoadNexusProcessed::calculateWorkspacesize(const int numberofspectra) * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadNexusProcessed::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) + bool LoadNexusProcessed::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bnexs(false); diff --git a/Code/Mantid/Nexus/src/LoadSNSNexus.cpp b/Code/Mantid/Nexus/src/LoadSNSNexus.cpp index 441f5010157..6ce3dc01629 100644 --- a/Code/Mantid/Nexus/src/LoadSNSNexus.cpp +++ b/Code/Mantid/Nexus/src/LoadSNSNexus.cpp @@ -318,7 +318,7 @@ double LoadSNSNexus::dblSqrt(double in) * @param header_buffer - buffer containing the 1st 100 bytes of the file * @return true if the given file is of type which can be loaded by this algorithm */ - bool LoadSNSNexus::quickFileCheck(const std::string& filePath,int nread,unsigned char* header_buffer) + bool LoadSNSNexus::quickFileCheck(const std::string& filePath,size_t nread,unsigned char* header_buffer) { std::string extn=extension(filePath); bool bnexs(false); @@ -326,7 +326,7 @@ double LoadSNSNexus::dblSqrt(double in) /* * HDF files have magic cookie 0x0e031301 in the first 4 bytes */ - if ( (nread >= sizeof(unsigned)) && (ntohl(header_buffer_union.u) == 0x0e031301)||bnexs ) + if ( ((nread >= sizeof(unsigned)) && (ntohl(header_buffer_union.u) == 0x0e031301)) || bnexs ) { //hdf return true; -- GitLab