From f6c119bb54dceaa1451f31c7c0be504a7f6bf3ca Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 30 Oct 2013 17:21:38 +0000 Subject: NO-JIRA: Fix compile errors in legacystore on older compilers git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1537188 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp b/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp index c61c8fe40b..613da45633 100644 --- a/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp +++ b/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp @@ -194,13 +194,13 @@ void EmptyFilePool::resetEmptyFileHeader(const std::string& fqFileName) { char buff[buffsize]; fs.read((char*)buff, buffsize); std::streampos bytesRead = fs.tellg(); - if (bytesRead == buffsize) { + if (std::streamoff(bytesRead) == buffsize) { ::file_hdr_reset((::file_hdr_t*)buff); ::memset(buff + sizeof(::file_hdr_t), 0, MAX_FILE_HDR_LEN - sizeof(::file_hdr_t)); // set rest of buffer to 0 fs.seekp(0, std::fstream::beg); fs.write(buff, buffsize); std::streampos bytesWritten = fs.tellp(); - if (bytesWritten != buffsize) { + if (std::streamoff(bytesWritten) != buffsize) { //std::cerr << "ERROR: Unable to write file header of file \"" << fqFileName_ << "\": tried to write " << buffsize << " bytes; wrote " << bytesWritten << " bytes." << std::endl; } } else { @@ -240,7 +240,7 @@ bool EmptyFilePool::validateEmptyFile(const std::string& emptyFileName) const { char buff[buffsize]; fs.read((char*)buff, buffsize); std::streampos bytesRead = fs.tellg(); - if (bytesRead != buffsize) { + if (std::streamoff(bytesRead) != buffsize) { oss << "ERROR: Unable to read file header of file \"" << emptyFileName << "\": tried to read " << buffsize << " bytes; read " << bytesRead << " bytes"; journalLogRef_.log(JournalLog::LOG_ERROR, oss.str()); fs.close(); @@ -272,7 +272,7 @@ bool EmptyFilePool::validateEmptyFile(const std::string& emptyFileName) const { fs.seekp(0, std::fstream::beg); fs.write(buff, buffsize); std::streampos bytesWritten = fs.tellp(); - if (bytesWritten != buffsize) { + if (std::streamoff(bytesWritten) != buffsize) { oss << "ERROR: Unable to write file header of file \"" << emptyFileName << "\": tried to write " << buffsize << " bytes; wrote " << bytesWritten << " bytes"; journalLogRef_.log(JournalLog::LOG_ERROR, oss.str()); fs.close(); -- cgit v1.2.1