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
commit6ad92b5d266554940fd822ca8f12c3f9b5fe06b2 (patch)
tree122a76c54e71605627bcb81b71e0ced618bfbe3e
parente13ef6f44f474a22861ce27fac356323b93daaa5 (diff)
downloadrabbitmq-server-git-6ad92b5d266554940fd822ca8f12c3f9b5fe06b2.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 a2d9350c4e..9631e03b6c 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 e22d844fdf..a2ac74ef81 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