diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2015-05-06 00:58:24 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2015-05-06 00:58:24 (GMT) |
commit | 1c3e633c48766c58df949887297dc5838170a33f (patch) | |
tree | 60e1c049b36db5576bf33c51c627a747dd8e5daa /programs/lz4io.c | |
parent | 05b0aa62a785bbf17b2452a0e7cda04bc630cc27 (diff) | |
download | lz4-1c3e633c48766c58df949887297dc5838170a33f.zip lz4-1c3e633c48766c58df949887297dc5838170a33f.tar.gz lz4-1c3e633c48766c58df949887297dc5838170a33f.tar.bz2 |
Added compilation flag -Wcast-qual
Diffstat (limited to 'programs/lz4io.c')
-rw-r--r-- | programs/lz4io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/programs/lz4io.c b/programs/lz4io.c index 15c93f4..209f5ed 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -630,10 +630,10 @@ static unsigned LZ4IO_readLE32 (const void* s) static unsigned LZ4IO_fwriteSparse(FILE* file, const void* buffer, size_t bufferSize, unsigned storedSkips) { - size_t* const bufferT = (size_t*)buffer; /* Buffer is supposed malloc'ed, hence aligned on size_t */ - size_t* ptrT = bufferT; + const size_t* const bufferT = (const size_t*)buffer; /* Buffer is supposed malloc'ed, hence aligned on size_t */ + const size_t* ptrT = bufferT; size_t bufferSizeT = bufferSize / sizeT; - size_t* const bufferTEnd = bufferT + bufferSizeT; + const size_t* const bufferTEnd = bufferT + bufferSizeT; static const size_t segmentSizeT = (32 KB) / sizeT; if (!g_sparseFileSupport) /* normal write */ @@ -679,7 +679,7 @@ static unsigned LZ4IO_fwriteSparse(FILE* file, const void* buffer, size_t buffer if (bufferSize & maskT) /* size not multiple of sizeT : implies end of block */ { - const char* const restStart = (char*)bufferTEnd; + const char* const restStart = (const char*)bufferTEnd; const char* restPtr = restStart; size_t restSize = bufferSize & maskT; const char* const restEnd = restStart + restSize; |