]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Clean up compiler warnings + Build pzstd on travis
authorNick Terrell <terrelln@fb.com>
Fri, 2 Sep 2016 19:23:49 +0000 (12:23 -0700)
committerNick Terrell <terrelln@fb.com>
Fri, 2 Sep 2016 19:23:49 +0000 (12:23 -0700)
.travis.yml
contrib/pzstd/ErrorHolder.h
contrib/pzstd/Makefile
contrib/pzstd/SkippableFrame.cpp

index 3b77dd94a4267e894103ff561ec11e6f6584caab..d5479a97427663ddda24da4446ca05f5c0c36979 100644 (file)
@@ -19,7 +19,7 @@ matrix:
           packages:
             - gcc-4.8
             - g++-4.8
-      env: PLATFORM="Ubuntu 12.04 container" CMD="make -C tests test-zstd_nolegacy && make clean && make zlibwrapper && make clean && make cmaketest && make -C contrib/pzstd googletest && make -C contrib/pzstd test && make -C contrib/pzstd clean"
+      env: PLATFORM="Ubuntu 12.04 container" CMD="make -C tests test-zstd_nolegacy && make clean && make zlibwrapper && make clean && make cmaketest && make clean && make -C contrib/pzstd pzstd && make -C contrib/pzstd googletest && make -C contrib/pzstd test && make -C contrib/pzstd clean"
     - os: linux
       sudo: false
       env: PLATFORM="Ubuntu 12.04 container" CMD="make usan"
index 4a81a068c845bedd10be9ba9ccee5b9a45b676ea..188badcadfd341dfe7a432b72e5cc6c566e4009b 100644 (file)
@@ -9,6 +9,7 @@
 #pragma once
 
 #include <atomic>
+#include <cassert>
 #include <stdexcept>
 #include <string>
 
@@ -47,9 +48,7 @@ class ErrorHolder {
   }
 
   ~ErrorHolder() {
-    if (hasError()) {
-      throw std::logic_error(message_);
-    }
+    assert(!hasError());
   }
 };
 }
index 6f9231b2a52ec556d35b9fc7bff07100f8d3f734..5338a5a9ed16923d4393d022d7ef0b00fa94e047 100644 (file)
@@ -10,7 +10,7 @@
 ZSTDDIR = ../../lib
 PROGDIR = ../../programs
 
-CPPFLAGS = -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder -I$(PROGDIR) -I.
+CPPFLAGS = -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(PROGDIR) -I.
 CXXFLAGS  ?= -O3
 CXXFLAGS  += -std=c++11
 CXXFLAGS  += $(MOREFLAGS)
@@ -55,7 +55,7 @@ main.o: main.cpp *.h utils/*.h
        $(CXX) $(FLAGS) -c main.cpp -o $@
 
 pzstd: Pzstd.o SkippableFrame.o Options.o main.o libzstd.a 
-       $(CXX) $(FLAGS) $^ -o $@$(EXT)
+       $(CXX) $(FLAGS) $^ -o $@$(EXT) -lpthread
 
 googletest:
        @git clone https://github.com/google/googletest
index 20ad4cc8eb0c98e4674370c3452abe6b3547a626..5dc95e5ab09935dc53c98b4c42a9431429ae7807 100644 (file)
@@ -7,7 +7,7 @@
  * of patent rights can be found in the PATENTS file in the same directory.
  */
 #include "SkippableFrame.h"
-#include "common/mem.h"
+#include "mem.h"
 #include "utils/Range.h"
 
 #include <cstdio>