summaryrefslogtreecommitdiff
path: root/cpp
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
commit1568bd8090c8b3df4463849ac27dd08452309335 (patch)
treed8b927f053e33c2723b766aeccc4cd523e6c281a /cpp
parentce2cfe8e608afa8a3199a39cbb3a3c6380f0cdce (diff)
downloadqpid-python-1568bd8090c8b3df4463849ac27dd08452309335.tar.gz
NO-JIRA: Fix compile errors in legacystore on older compilers
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1537188 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp b/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp
index c61c8fe40b..613da45633 100644
--- a/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp
+++ b/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();