Added : clang test
authorYann Collet <yann.collet.73@gmail.com>
Sun, 15 Mar 2015 13:19:47 +0000 (14:19 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Sun, 15 Mar 2015 13:19:47 +0000 (14:19 +0100)
.travis.yml
Makefile
lib/lz4.c
lib/xxhash.h
programs/frametest.c
programs/lz4io.c

index 5e4f3aa..4e975b5 100644 (file)
@@ -13,6 +13,7 @@ env:
   - LZ4_TRAVIS_CI_ENV=streaming-examples
   - LZ4_TRAVIS_CI_ENV=cmake
   - LZ4_TRAVIS_CI_ENV=gpptest
+  - LZ4_TRAVIS_CI_ENV=clangtest
   - LZ4_TRAVIS_CI_ENV=staticAnalyze
   - LZ4_TRAVIS_CI_ENV=dist
   - LZ4_TRAVIS_CI_ENV=test-lz4
index 85fabc6..941f384 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -127,9 +127,12 @@ test-travis: $(TRAVIS_TARGET)
 cmake:
        @cd cmake_unofficial; cmake CMakeLists.txt; $(MAKE)
 
-gpptest:
+gpptest: clean
        export CC=g++; export CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align"; $(MAKE) -e all
 
+clangtest: clean
+       export CC=clang; $(MAKE) all
+
 staticAnalyze: clean
        export CFLAGS=-g; scan-build -v $(MAKE) all
 
index 2537058..70c5616 100644 (file)
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1,6 +1,7 @@
 /*
    LZ4 - Fast LZ compression algorithm
    Copyright (C) 2011-2015, Yann Collet.
+
    BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
 
    Redistribution and use in source and binary forms, with or without
index 55b4501..99b0c27 100644 (file)
@@ -1,7 +1,8 @@
 /*
    xxHash - Extremely Fast Hash algorithm
    Header File
-   Copyright (C) 2012-2014, Yann Collet.
+   Copyright (C) 2012-2015, Yann Collet.
+
    BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
 
    Redistribution and use in source and binary forms, with or without
index c69de8c..24cf921 100644 (file)
@@ -1,6 +1,7 @@
 /*
     frameTest - test tool for lz4frame
-    Copyright (C) Yann Collet 2014
+    Copyright (C) Yann Collet 2014-2015
+
     GPL v2 License
 
     This program is free software; you can redistribute it and/or modify
@@ -18,7 +19,7 @@
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
     You can contact the author at :
-    - LZ4 source repository : http://code.google.com/p/lz4/
+    - LZ4 source repository : https://github.com/Cyan4973/lz4
     - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c
 */
 
index 50eb035..34fbe10 100644 (file)
@@ -612,7 +612,7 @@ static unsigned long long decodeLZ4S(FILE* finput, FILE* foutput)
             static const size_t zeroBlockSize = 32 KB;
             while (oBuffPos < oBuffEnd)
             {
-                const size_t* sPtr = (const size_t*)oBuffPos;
+                const size_t* sPtr = (const size_t*)(void*)oBuffPos;
                 size_t seg0Size = zeroBlockSize;
                 size_t nbSizeT;
                 size_t checked;
@@ -723,10 +723,7 @@ int LZ4IO_decompressFilename(const char* input_filename, const char* output_file
     get_fileHandle(input_filename, output_filename, &finput, &foutput);
 
     /* sparse file */
-    if (g_sparseFileSupport && foutput)
-    {
-        SET_SPARSE_FILE_MODE(foutput);
-    }
+    if (g_sparseFileSupport && foutput) { SET_SPARSE_FILE_MODE(foutput); }
 
     /* Loop over multiple streams */
     do