]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix some more ARM compile errors
authorSean Purcell <me@seanp.xyz>
Fri, 24 Feb 2017 18:53:16 +0000 (10:53 -0800)
committerSean Purcell <me@seanp.xyz>
Fri, 24 Feb 2017 18:55:42 +0000 (10:55 -0800)
https://travis-ci.org/facebook/zstd/jobs/204807461

Can't get them to reproduce the compile errors locally,
tested fix by forcing that test to run on Travis.

tests/decodecorpus.c

index d75025a833e805f96435d59c2fc79a0ef2517fdb..ecac7b23438413ab4850010d42a876672e1a8b6e 100644 (file)
@@ -609,17 +609,16 @@ static U32 generateSequences(U32* seed, frame_t* frame, seqStore_t* seqStore,
 {
     /* The total length of all the matches */
     size_t const remainingMatch = contentSize - literalsSize;
-    size_t excessMatch;
+    size_t excessMatch = 0;
+    U32 numSequences = 0;
+
     U32 i;
 
-    U32 numSequences;
 
     const BYTE* literals = LITERAL_BUFFER;
     BYTE* srcPtr = frame->src;
 
-    if (literalsSize == contentSize) {
-        numSequences = 0;
-    } else {
+    if (literalsSize != contentSize) {
         /* each match must be at least MIN_SEQ_LEN, so this is the maximum
          * number of sequences we can have */
         U32 const maxSequences = (U32)remainingMatch / MIN_SEQ_LEN;