summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@lshift.net>2009-10-29 12:01:23 +0000
committerMatthew Sackman <matthew@lshift.net>2009-10-29 12:01:23 +0000
commit3003ef4854b297560d7b876db9e37c0ffc7a98e4 (patch)
tree122a76c54e71605627bcb81b71e0ced618bfbe3e
parent1291cc279c5cbddc499c762fe46142fb3c885560 (diff)
downloadrabbitmq-server-3003ef4854b297560d7b876db9e37c0ffc7a98e4.tar.gz
Added specs which, importantly, feature no_return() as the return types, in order to shut up dialyzer
-rw-r--r--src/gen_server2.erl11
-rw-r--r--src/rabbit_plugin_activator.erl11
2 files changed, 22 insertions, 0 deletions
diff --git a/src/gen_server2.erl b/src/gen_server2.erl
index a2d9350c..9631e03b 100644
--- a/src/gen_server2.erl
+++ b/src/gen_server2.erl
@@ -180,6 +180,17 @@
-import(error_logger, [format/2]).
%%%=========================================================================
+%%% Specs. These exist only to shut up dialyzer's warnings
+%%%=========================================================================
+
+-ifdef(use_specs).
+
+-spec(handle_common_termination/6 ::
+ (any(), any(), any(), atom(), any(), any()) -> no_return()).
+
+-endif.
+
+%%%=========================================================================
%%% API
%%%=========================================================================
diff --git a/src/rabbit_plugin_activator.erl b/src/rabbit_plugin_activator.erl
index e22d844f..a2ac74ef 100644
--- a/src/rabbit_plugin_activator.erl
+++ b/src/rabbit_plugin_activator.erl
@@ -39,6 +39,17 @@
-define(BaseApps, [rabbit]).
%%----------------------------------------------------------------------------
+%% Specs
+%%----------------------------------------------------------------------------
+
+-ifdef(use_specs).
+
+-spec(start/0 :: () -> no_return()).
+-spec(stop/0 :: () -> 'ok').
+
+-endif.
+
+%%----------------------------------------------------------------------------
start() ->
%% Ensure Rabbit is loaded so we can access it's environment