summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-10-30 17:21:38 +0000
committerAlan Conway <aconway@apache.org>2013-10-30 17:21:38 +0000
commitf6c119bb54dceaa1451f31c7c0be504a7f6bf3ca (patch)
treeafc335160ace96182b8aa8389b712cc93a600061
parentb5bb49f00c647d8460584f25bb74a0077a05de30 (diff)
downloadqpid-python-f6c119bb54dceaa1451f31c7c0be504a7f6bf3ca.tar.gz
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
-rw-r--r--qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp8
1 files changed, 4 insertions, 4 deletions
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();