summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-18 09:54:07 +0000
committerpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-18 09:54:07 +0000
commitf6d5937b013077dae0fe29bc85d791e9c74aaeeb (patch)
tree5adda611726fd0186db7fcd45cbf5b7db0626de4 /src
parent599941771e7d174c3e15f65ab2a1d7d9fefbd5f3 (diff)
untested fix for "unused functions"
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7471 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/json.h8
-rw-r--r--src/modules/m_rpc_json.cpp4
2 files changed, 4 insertions, 8 deletions
diff --git a/src/modules/json.h b/src/modules/json.h
index ca9ed8d3f..7643d9713 100644
--- a/src/modules/json.h
+++ b/src/modules/json.h
@@ -18,10 +18,6 @@
#define expect_false(expr) maybe_expect ((expr) != 0, 0)
#define expect_true(expr) maybe_expect ((expr) != 0, 1)
-static void unreachable_internal (char const *file, int line, char const *function);
-static void throw_unless_internal (char const *file, int line, char const *function, char const *condition);
-static void throw_msg_unless_internal (char const *file, int line, char const *function, char const *message);
-
#ifdef __GNUC__
# define CURFUNC __PRETTY_FUNCTION__
#elif defined(__BORLANDC__)
@@ -30,10 +26,6 @@ static void throw_msg_unless_internal (char const *file, int line, char const *f
# define CURFUNC __FUNCTION__
#endif
-#define throw_unreachable unreachable_internal (__FILE__, __LINE__, CURFUNC)
-#define throw_unless(condition) if (!expect_false (condition)) throw_unless_internal (__FILE__, __LINE__, CURFUNC, #condition)
-#define throw_msg_unless(condition, message) if (!expect_false (condition)) throw_msg_unless_internal (__FILE__, __LINE__, CURFUNC, message)
-
namespace json
{
class ValueIterator;
diff --git a/src/modules/m_rpc_json.cpp b/src/modules/m_rpc_json.cpp
index 563ca627c..4bcb3ba08 100644
--- a/src/modules/m_rpc_json.cpp
+++ b/src/modules/m_rpc_json.cpp
@@ -135,6 +135,10 @@ throw_msg_unless_internal (char const *file, int line, char const *function, cha
throw std::runtime_error (buf);
}
+#define throw_unreachable unreachable_internal (__FILE__, __LINE__, CURFUNC)
+#define throw_unless(condition) if (!expect_false (condition)) throw_unless_internal (__FILE__, __LINE__, CURFUNC, #condition)
+#define throw_msg_unless(condition, message) if (!expect_false (condition)) throw_msg_unless_internal (__FILE__, __LINE__, CURFUNC, message)
+
namespace json
{