diff --git a/Code/Mantid/Framework/DataHandling/src/FakeISISHistoDAE.cpp b/Code/Mantid/Framework/DataHandling/src/FakeISISHistoDAE.cpp index 6b145c326cf97588b0449dbefc0d51e29df1a7e7..3e99435d007b3974cb9c7b65959d39249c3f27e1 100644 --- a/Code/Mantid/Framework/DataHandling/src/FakeISISHistoDAE.cpp +++ b/Code/Mantid/Framework/DataHandling/src/FakeISISHistoDAE.cpp @@ -56,7 +56,7 @@ public: m_nBins(nbins) { char buffer[1024]; - int n = socket().receiveBytes(&buffer,1024); + socket().receiveBytes(&buffer,1024); sendOK(); } ~TestServerConnection() @@ -76,7 +76,7 @@ public: { isisds_command_header_t comm; memset( &comm, 0, sizeof(comm) ); - comm.len = sizeof(comm) + (int)str.size(); + comm.len = (int)sizeof(comm) + (int)str.size(); comm.type = ISISDSChar; comm.ndims = 1; comm.dims_array[0] = (int)str.size(); @@ -88,7 +88,7 @@ public: { isisds_command_header_t comm; memset( &comm, 0, sizeof(comm) ); - comm.len = sizeof(comm) + sizeof(int); + comm.len = (int)sizeof(comm) + sizeof(int); comm.type = ISISDSInt32; comm.ndims = 1; comm.dims_array[0] = 1; @@ -113,21 +113,21 @@ public: } const int ndata = nos * nb1; std::vector<int> data( ndata ); - for(size_t i = 0; i < nos; ++i) + for(int i = 0; i < nos; ++i) { - const int value = period * 1000 + istart + (int)i; + const int value = period * 1000 + istart + i; std::fill( data.begin() + i * nb1, data.begin() + ( i + 1 ) * nb1, value ); } isisds_command_header_t comm; memset( &comm, 0, sizeof(comm) ); - comm.len = sizeof(comm) + sizeof(int) * ndata; + comm.len = (int)(sizeof(comm) + sizeof(int) * ndata); comm.type = ISISDSInt32; comm.ndims = 2; comm.dims_array[0] = nos; comm.dims_array[1] = m_nBins + 1; strncpy(comm.command, "OK", sizeof(comm.command)); socket().sendBytes(&comm, sizeof(comm)); - socket().sendBytes(data.data(), sizeof(int) * ndata); + socket().sendBytes(data.data(), (int)sizeof(int) * ndata); } void sendFloatArray(const std::vector<float>& arr) { @@ -213,7 +213,7 @@ public: else if ( command == "UDET" ) { std::vector<int> udet( m_nSpectra ); - for(size_t i = 0; i < m_nSpectra; ++i) + for(int i = 0; i < m_nSpectra; ++i) { udet[i] = (int)( 1000 + i + 1 ); } @@ -222,7 +222,7 @@ public: else if ( command == "SPEC" ) { std::vector<int> spec( m_nSpectra ); - for(size_t i = 0; i < m_nSpectra; ++i) + for(int i = 0; i < m_nSpectra; ++i) { spec[i] = (int)( i + 1 ); } diff --git a/Code/Mantid/Framework/DataHandling/src/ISISHistoDataListener.cpp b/Code/Mantid/Framework/DataHandling/src/ISISHistoDataListener.cpp index 28b9380e6044cb0b0b415caafd256df7c252c308..5c94cef47bf6038e7d92469cd1a85516fad79277 100644 --- a/Code/Mantid/Framework/DataHandling/src/ISISHistoDataListener.cpp +++ b/Code/Mantid/Framework/DataHandling/src/ISISHistoDataListener.cpp @@ -311,7 +311,7 @@ namespace DataHandling for(size_t i = 1; i < m_specList.size(); ++i) { specid_t next = m_specList[i]; - if ( next - m_specList[i-1] > 1 || i - i0 >= maxNumberOfSpectra ) + if ( next - m_specList[i-1] > 1 || static_cast<int>(i - i0) >= maxNumberOfSpectra ) { index.push_back( spec ); count.push_back( static_cast<int>( i - i0 ) );