You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2013/10/30 18:21:38 UTC
svn commit: r1537188 -
/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp
Author: aconway
Date: Wed Oct 30 17:21:38 2013
New Revision: 1537188
URL: http://svn.apache.org/r1537188
Log:
NO-JIRA: Fix compile errors in legacystore on older compilers
Modified:
qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp
Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp?rev=1537188&r1=1537187&r2=1537188&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp Wed Oct 30 17:21:38 2013
@@ -194,13 +194,13 @@ void EmptyFilePool::resetEmptyFileHeader
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(co
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(co
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();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org