summaryrefslogtreecommitdiff
path: root/src/include/debug.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-05-18 14:21:04 +0800
committerJohn Hodge <tpg@mutabah.net>2016-05-18 14:21:04 +0800
commit5e4c623370cfa3df4e73f80f980e06766bfad929 (patch)
treeecc4c4d28933725088f97f07ef38d2bb559e35f3 /src/include/debug.hpp
parent2983a5f8a6b08acc34413a85f7e554ec7ceaad2d (diff)
downloadmrust-5e4c623370cfa3df4e73f80f980e06766bfad929.tar.gz
All - Fix up a bunch of -Wextra warnings
Diffstat (limited to 'src/include/debug.hpp')
-rw-r--r--src/include/debug.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/include/debug.hpp b/src/include/debug.hpp
index e1dedb7b..9dafdb42 100644
--- a/src/include/debug.hpp
+++ b/src/include/debug.hpp
@@ -13,7 +13,7 @@ extern int g_debug_indent_level;
#else
#define INDENT() do { } while(0)
#define UNINDENT() do {} while(0)
-#define DEBUG(ss) do{ } while(0)
+#define DEBUG(ss) do{ (void)(::NullSink() << ss); } while(0)
#endif
extern bool debug_enabled();
@@ -31,6 +31,13 @@ struct RepeatLitStr
}
};
+class NullSink:
+ public ::std::ostream
+{
+public:
+ NullSink() {}
+};
+
class TraceLog
{
const char* m_tag;