summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/io/read_test.cpp11
-rw-r--r--src/map/script.cpp2
-rw-r--r--src/warnings.hpp2
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