summaryrefslogtreecommitdiff
path: root/src/generic
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-06-26 18:18:01 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-06-26 20:45:30 -0700
commitec21450522e3c2124f3510eef5cfd88420483248 (patch)
tree2d3dbd342dccd34bc3545ae3ab7902042abe6815 /src/generic
parent296629e067563e82b4a08b2a785d1c2f13b5a285 (diff)
downloadtmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.gz
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.bz2
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.tar.xz
tmwa-ec21450522e3c2124f3510eef5cfd88420483248.zip
Low hanging fruit
Diffstat (limited to 'src/generic')
-rw-r--r--src/generic/array_test.cpp2
-rw-r--r--src/generic/intern-pool_test.cpp3
-rw-r--r--src/generic/md5_test.cpp3
-rw-r--r--src/generic/oops.hpp3
-rw-r--r--src/generic/oops_test.cpp5
5 files changed, 13 insertions, 3 deletions
diff --git a/src/generic/array_test.cpp b/src/generic/array_test.cpp
index 7b5ffca..a4d4d74 100644
--- a/src/generic/array_test.cpp
+++ b/src/generic/array_test.cpp
@@ -23,6 +23,8 @@
#include "../poison.hpp"
+#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+
TEST(Array, simple)
{
GenericArray<int, SimpleIndexing<3>> a;
diff --git a/src/generic/intern-pool_test.cpp b/src/generic/intern-pool_test.cpp
index bef001f..66490be 100644
--- a/src/generic/intern-pool_test.cpp
+++ b/src/generic/intern-pool_test.cpp
@@ -24,6 +24,9 @@
#include "../poison.hpp"
+
+#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+
TEST(InternPool, whydoesthisalwaysneedasecondname)
{
InternPool p;
diff --git a/src/generic/md5_test.cpp b/src/generic/md5_test.cpp
index 047b082..b7854c9 100644
--- a/src/generic/md5_test.cpp
+++ b/src/generic/md5_test.cpp
@@ -25,6 +25,9 @@
#include "../poison.hpp"
+
+#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+
// This should be made part of the main API,
// but is not yet to keep the diff small.
// Edit: hack to fix the new strict comparison.
diff --git a/src/generic/oops.hpp b/src/generic/oops.hpp
index 231a4e4..cc0cdcd 100644
--- a/src/generic/oops.hpp
+++ b/src/generic/oops.hpp
@@ -30,14 +30,13 @@
class AssertionError : public std::runtime_error
{
- const char *_what;
public:
AssertionError(const char *desc, const char *expr,
const char *file, size_t line, const char *function);
};
# define ALLEGE(desc, expr) \
- if (expr) {} \
+ if (expr) {} \
else throw AssertionError(desc, #expr, __FILE__, __LINE__, __PRETTY_FUNCTION__)
#endif // TMWA_GENERIC_OOPS_HPP
diff --git a/src/generic/oops_test.cpp b/src/generic/oops_test.cpp
index d16db04..13f7fac 100644
--- a/src/generic/oops_test.cpp
+++ b/src/generic/oops_test.cpp
@@ -22,6 +22,9 @@
#include "../poison.hpp"
+
+#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
+
TEST(oops, okay)
{
try
@@ -45,6 +48,6 @@ TEST(oops, uhoh)
catch (const AssertionError& e)
{
ASSERT_STREQ(strstr(e.what(), "src/generic/"),
- "src/generic/oops_test.cpp:42: error: in 'virtual void oops_uhoh_Test::TestBody()', incorrectly alleged that 'the sky is falling' (1 == 0)");
+ "src/generic/oops_test.cpp:45: error: in 'virtual void oops_uhoh_Test::TestBody()', incorrectly alleged that 'the sky is falling' (1 == 0)");
}
}