aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-12-13 11:49:55 +0100
committerMohamad Ayyash <mkayyash@google.com>2015-02-23 17:26:22 -0800
commitc9355f9ca248558c5635ec5310b3459984eee81d (patch)
tree605bbc513c0e6e34b902394379d41640ef07e785
parentc99e5fbfcd11304f5cf6b6100143d41e4eb3f21e (diff)
downloadlz4-c9355f9ca248558c5635ec5310b3459984eee81d.tar.gz
Fixed : minor warnings under Visual
-rwxr-xr-x[-rw-r--r--]examples/HCStreaming_ringBuffer.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/examples/HCStreaming_ringBuffer.c b/examples/HCStreaming_ringBuffer.c
index dfa26704..cfae9d74 100644..100755
--- a/examples/HCStreaming_ringBuffer.c
+++ b/examples/HCStreaming_ringBuffer.c
@@ -58,7 +58,6 @@ void test_compress(FILE* outFp, FILE* inpFp)
static char inpBuf[RING_BUFFER_BYTES];
int inpOffset = 0;
- unsigned done = 0;
for(;;)
{
@@ -77,7 +76,6 @@ void test_compress(FILE* outFp, FILE* inpFp)
write_bin(outFp, cmpBuf, cmpBytes);
inpOffset += inpBytes;
- done += inpBytes;
// Wraparound the ringbuffer offset
if(inpOffset >= RING_BUFFER_BYTES - MESSAGE_MAX_BYTES)
@@ -95,7 +93,6 @@ void test_decompress(FILE* outFp, FILE* inpFp)
int decOffset = 0;
LZ4_streamDecode_t lz4StreamDecode_body = { 0 };
LZ4_streamDecode_t* lz4StreamDecode = &lz4StreamDecode_body;
- unsigned done = 0;
for(;;)
{
@@ -120,7 +117,6 @@ void test_decompress(FILE* outFp, FILE* inpFp)
if(decBytes <= 0)
break;
- done += decBytes;
decOffset += decBytes;
write_bin(outFp, decPtr, decBytes);
@@ -153,7 +149,7 @@ size_t compare(FILE* f0, FILE* f1)
size_t smallest = r0;
if (r1<r0) smallest = r1;
result += smallest;
- return result;
+ break;
}
if (memcmp(b0, b1, r0))
@@ -161,13 +157,13 @@ size_t compare(FILE* f0, FILE* f1)
unsigned errorPos = 0;
while ((errorPos < r0) && (b0[errorPos]==b1[errorPos])) errorPos++;
result += errorPos;
- return result;
+ break;
}
result += sizeof(b0);
}
- return 1;
+ return result;
}