1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-4010 - fixes compilation errors on x64 w/-Werror

Merged in Sergei's patch.
This commit is contained in:
Patrick LeBlanc
2020-06-01 12:52:43 -04:00
parent a8f5d353bd
commit 4bddc92092
9 changed files with 16 additions and 33 deletions

View File

@ -74,7 +74,7 @@ bool AppendTask::run()
while (readCount < cmd->count)
{
uint toRead = min(cmd->count - readCount, bufsize);
uint toRead = min(static_cast<uint>(cmd->count - readCount), bufsize);
success = read(&databuf[0], toRead);
check_error("AppendTask read data", false);
if (success==0)

View File

@ -174,7 +174,7 @@ string use_envvar(const boost::smatch &envvar)
string expand_numbers(const boost::smatch &match)
{
long num = stol(match[1].str());
long long num = stol(match[1].str());
char suffix = (char) ::tolower(match[2].str()[0]);
if (suffix == 't')

View File

@ -461,8 +461,8 @@ void MetadataFile::printObjects() const
{
BOOST_FOREACH(const boost::property_tree::ptree::value_type &v, jsontree->get_child("objects"))
{
printf("Name: %s Length: %lu Offset: %lu\n", v.second.get<string>("key").c_str(),
v.second.get<size_t>("length"), v.second.get<off_t>("offset"));
printf("Name: %s Length: %zu Offset: %lld\n", v.second.get<string>("key").c_str(),
v.second.get<size_t>("length"), (long long)v.second.get<off_t>("offset"));
}
}

View File

@ -74,7 +74,7 @@ bool WriteTask::run()
while (readCount < cmd->count)
{
uint toRead = min(cmd->count - readCount, bufsize);
uint toRead = min(static_cast<uint>(cmd->count - readCount), bufsize);
success = read(&databuf[0], toRead);
check_error("WriteTask read data", false);
if (success==0)

View File

@ -433,7 +433,7 @@ bool writetask()
WriteTask w(clientSock, hdr->payloadLen);
ssize_t result = ::write(sessionSock, cmd, hdr->payloadLen);
assert(result==(hdr->payloadLen));
assert(result == static_cast<ssize_t>(hdr->payloadLen));
w.run();
@ -1065,7 +1065,7 @@ bool copytask(bool connectionTest=false)
len -= 2;
ssize_t result = ::write(sessionSock, buf, len);
assert(result==len);
assert(result==static_cast<ssize_t>(len));
int err=0;
@ -1805,7 +1805,7 @@ void shortMsg()
WriteTask w(clientSock, hdrWrite->payloadLen);
ssize_t result = ::write(sessionSock, cmdWrite, hdrWrite->payloadLen);
assert(result==(hdrWrite->payloadLen));
assert(result==static_cast<ssize_t>(hdrWrite->payloadLen));
w.run();