diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-10-11 08:36:04 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-10-11 08:36:04 +0200 |
commit | daabb4d055a59247d5294ddee364f5c265bc37cd (patch) | |
tree | 35d9397ce9bd89ceab624f6e79a4ca33f46fb8e9 /storage/connect/filamgz.cpp | |
parent | 4de344a8d7aba975912984623ae26b57b65e251b (diff) | |
download | mariadb-git-daabb4d055a59247d5294ddee364f5c265bc37cd.tar.gz |
Fix truncation warnings in connect
Diffstat (limited to 'storage/connect/filamgz.cpp')
-rw-r--r-- | storage/connect/filamgz.cpp | 8 |
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 |