cmCTest: Use size_t for cmsysBase64_Encode return value
This commit is contained in:
parent
a9fae8ac1d
commit
0bdd4ebfb8
|
@ -116,10 +116,10 @@ void cmCTestRunTest::CompressOutput()
|
||||||
unsigned char *encoded_buffer
|
unsigned char *encoded_buffer
|
||||||
= new unsigned char[static_cast<int>(outSize * 1.5)];
|
= new unsigned char[static_cast<int>(outSize * 1.5)];
|
||||||
|
|
||||||
unsigned long rlen
|
size_t rlen
|
||||||
= cmsysBase64_Encode(out, strm.total_out, encoded_buffer, 1);
|
= cmsysBase64_Encode(out, strm.total_out, encoded_buffer, 1);
|
||||||
|
|
||||||
for(unsigned long i = 0; i < rlen; i++)
|
for(size_t i = 0; i < rlen; i++)
|
||||||
{
|
{
|
||||||
this->CompressedOutput += encoded_buffer[i];
|
this->CompressedOutput += encoded_buffer[i];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1976,9 +1976,8 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
|
||||||
= new unsigned char [ static_cast<int>(
|
= new unsigned char [ static_cast<int>(
|
||||||
static_cast<double>(len) * 1.5 + 5.0) ];
|
static_cast<double>(len) * 1.5 + 5.0) ];
|
||||||
|
|
||||||
unsigned long rlen
|
size_t rlen
|
||||||
= cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1);
|
= cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1);
|
||||||
unsigned long cc;
|
|
||||||
|
|
||||||
ostr
|
ostr
|
||||||
<< "\t\t\t<NamedMeasurement"
|
<< "\t\t\t<NamedMeasurement"
|
||||||
|
@ -1988,7 +1987,7 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
|
||||||
<< measurementfile.match(4) << "\""
|
<< measurementfile.match(4) << "\""
|
||||||
<< " encoding=\"base64\""
|
<< " encoding=\"base64\""
|
||||||
<< ">" << std::endl << "\t\t\t\t<Value>";
|
<< ">" << std::endl << "\t\t\t\t<Value>";
|
||||||
for ( cc = 0; cc < rlen; cc ++ )
|
for (size_t cc = 0; cc < rlen; cc ++ )
|
||||||
{
|
{
|
||||||
ostr << encoded_buffer[cc];
|
ostr << encoded_buffer[cc];
|
||||||
if ( cc % 60 == 0 && cc )
|
if ( cc % 60 == 0 && cc )
|
||||||
|
|
|
@ -1701,11 +1701,11 @@ std::string cmCTest::Base64EncodeFile(std::string file)
|
||||||
unsigned char *encoded_buffer
|
unsigned char *encoded_buffer
|
||||||
= new unsigned char [ (len * 3) / 2 + 5 ];
|
= new unsigned char [ (len * 3) / 2 + 5 ];
|
||||||
|
|
||||||
unsigned long rlen
|
size_t const rlen
|
||||||
= cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1);
|
= cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1);
|
||||||
|
|
||||||
std::string base64 = "";
|
std::string base64 = "";
|
||||||
for(unsigned long i = 0; i < rlen; i++)
|
for(size_t i = 0; i < rlen; i++)
|
||||||
{
|
{
|
||||||
base64 += encoded_buffer[i];
|
base64 += encoded_buffer[i];
|
||||||
}
|
}
|
||||||
|
@ -3193,7 +3193,7 @@ bool cmCTest::CompressString(std::string& str)
|
||||||
unsigned char* base64EncodedBuffer
|
unsigned char* base64EncodedBuffer
|
||||||
= new unsigned char[(outSize * 3) / 2];
|
= new unsigned char[(outSize * 3) / 2];
|
||||||
|
|
||||||
unsigned long rlen
|
size_t rlen
|
||||||
= cmsysBase64_Encode(out, strm.total_out, base64EncodedBuffer, 1);
|
= cmsysBase64_Encode(out, strm.total_out, base64EncodedBuffer, 1);
|
||||||
|
|
||||||
str = "";
|
str = "";
|
||||||
|
|
Loading…
Reference in New Issue