summaryrefslogtreecommitdiff
path: root/storage/connect/filamgz.cpp
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-10-11 08:36:04 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2017-10-11 08:36:04 +0200
commitdaabb4d055a59247d5294ddee364f5c265bc37cd (patch)
tree35d9397ce9bd89ceab624f6e79a4ca33f46fb8e9 /storage/connect/filamgz.cpp
parent4de344a8d7aba975912984623ae26b57b65e251b (diff)
downloadmariadb-git-daabb4d055a59247d5294ddee364f5c265bc37cd.tar.gz
Fix truncation warnings in connect
Diffstat (limited to 'storage/connect/filamgz.cpp')
-rw-r--r--storage/connect/filamgz.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/connect/filamgz.cpp b/storage/connect/filamgz.cpp
index df366ef15f9..3078935e8a4 100644
--- a/storage/connect/filamgz.cpp
+++ b/storage/connect/filamgz.cpp
@@ -537,7 +537,7 @@ int ZBKFAM::ReadBuffer(PGLOBAL g)
while (*NxtLine++ != '\n') ;
// Set caller line buffer
- n = NxtLine - CurLine - Ending;
+ n = (int)(NxtLine - CurLine - Ending);
memcpy(Tdbp->GetLine(), CurLine, n);
Tdbp->GetLine()[n] = '\0';
return RC_OK;
@@ -588,7 +588,7 @@ int ZBKFAM::ReadBuffer(PGLOBAL g)
for (NxtLine = CurLine; *NxtLine++ != '\n';) ;
// Set caller line buffer
- n = NxtLine - CurLine - Ending;
+ n = (int)(NxtLine - CurLine - Ending);
memcpy(Tdbp->GetLine(), CurLine, n);
Tdbp->GetLine()[n] = '\0';
Rbuf = (CurBlk == Block - 1) ? Last : Nrec;
@@ -1087,7 +1087,7 @@ bool ZLBFAM::SetPos(PGLOBAL g, int pos __attribute__((unused)))
/***********************************************************************/
int ZLBFAM::ReadBuffer(PGLOBAL g)
{
- int n;
+ size_t n;
void *rdbuf;
/*********************************************************************/
@@ -1299,7 +1299,7 @@ int ZLBFAM::WriteBuffer(PGLOBAL g)
else
NxtLine = CurLine + Lrecl;
- BlkLen = NxtLine - To_Buf;
+ BlkLen = (int)(NxtLine - To_Buf);
if (WriteCompressedBuffer(g)) {
Closing = TRUE; // To tell CloseDB about a Write error