From 1e2f6a1f5df5fe7b24ad8df731a80769095910b8 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Fri, 2 Sep 2016 12:23:49 -0700 Subject: [PATCH] Clean up compiler warnings + Build pzstd on travis --- .travis.yml | 2 +- contrib/pzstd/ErrorHolder.h | 5 ++--- contrib/pzstd/Makefile | 4 ++-- contrib/pzstd/SkippableFrame.cpp | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3b77dd94a..d5479a974 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/contrib/pzstd/ErrorHolder.h b/contrib/pzstd/ErrorHolder.h index 4a81a068c..188badcad 100644 --- a/contrib/pzstd/ErrorHolder.h +++ b/contrib/pzstd/ErrorHolder.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include @@ -47,9 +48,7 @@ class ErrorHolder { } ~ErrorHolder() { - if (hasError()) { - throw std::logic_error(message_); - } + assert(!hasError()); } }; } diff --git a/contrib/pzstd/Makefile b/contrib/pzstd/Makefile index 6f9231b2a..5338a5a9e 100644 --- a/contrib/pzstd/Makefile +++ b/contrib/pzstd/Makefile @@ -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 diff --git a/contrib/pzstd/SkippableFrame.cpp b/contrib/pzstd/SkippableFrame.cpp index 20ad4cc8e..5dc95e5ab 100644 --- a/contrib/pzstd/SkippableFrame.cpp +++ b/contrib/pzstd/SkippableFrame.cpp @@ -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