From afc52a3e6a8dd275d48a5e21cb15086b3ec63b5b Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sat, 21 Dec 2013 19:44:29 -0800 Subject: fix travis errors --- src/io/read_test.cpp | 11 ++++++++--- src/map/script.cpp | 2 +- src/warnings.hpp | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/io/read_test.cpp b/src/io/read_test.cpp index 193777f..8c459cbb 100644 --- a/src/io/read_test.cpp +++ b/src/io/read_test.cpp @@ -7,10 +7,15 @@ static int string_pipe(ZString sz) { - // if this doesn't work we'll get test failures anyway int pfd[2]; - pipe(pfd); - write(pfd[1], sz.c_str(), sz.size()); + if (-1 == pipe(pfd)) + return -1; + if (sz.size() != write(pfd[1], sz.c_str(), sz.size())) + { + close(pfd[0]); + close(pfd[1]); + return -1; + } close(pfd[1]); return pfd[0]; } diff --git a/src/map/script.cpp b/src/map/script.cpp index 6e4d18d..e947208 100644 --- a/src/map/script.cpp +++ b/src/map/script.cpp @@ -4166,7 +4166,7 @@ void builtin_getmap(ScriptState *st) } static -void builtin_mapexit(ScriptState *st) +void builtin_mapexit(ScriptState *) { runflag = 0; } diff --git a/src/warnings.hpp b/src/warnings.hpp index b8822d0..9932ce3 100644 --- a/src/warnings.hpp +++ b/src/warnings.hpp @@ -413,7 +413,9 @@ EC(-Wmissing-prototypes) /// // like -Wmissing-declarations but for variables instead of functions +#ifndef GTEST_HAS_PTHREAD // this is a hack EC(-Wmissing-variable-declarations) +#endif /// Warn about constructs not instrumented by /// -fmudflap -- cgit v1.2.3-70-g09d2