Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CBD-103 Fix dialyzer errors on OTP R15B01

OTP R15B01 detects some errors that OTP R14B04 doesn't.
Also, the option -Wrace-conditions seems to make dialyzer
hang (or at least take more than 1 hour to finish).

Change-Id: I63b1e7f29e6a0f1a6fd4034bfc357529ce05bf4f
Reviewed-on: http://review.couchbase.org/15458
Reviewed-by: Damien Katz <damien@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  • Loading branch information...
commit fcb59420b3444fb1a30b75e4c6479b2bf3347d1e 1 parent bc83d00
@fdmanana fdmanana authored fdmanana committed
View
1  Makefile.am
@@ -190,7 +190,6 @@ rebuild_plt:
dialyzer: all $(COUCHDB_PLT)
dialyzer --plt $(COUCHDB_PLT) \
--verbose \
- -Wrace_conditions \
-pa src/couchdb \
-pa src/couch_set_view \
-pa src/mapreduce \
View
2  src/couchdb/couch_access_log.erl
@@ -103,7 +103,7 @@ handle_info(_Info, State) ->
{ok, State}.
handle_call(_Args, State) ->
- {ok, State}.
+ {ok, ok, State}.
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
View
2  src/couchdb/couch_db_update_notifier.erl
@@ -59,7 +59,7 @@ handle_event({EventAtom, DbName}, Pid) ->
{ok, Pid}.
handle_call(_Request, State) ->
- {reply, ok, State}.
+ {ok, ok, State}.
handle_info({'EXIT', Pid, Reason}, Pid) ->
?LOG_ERROR("Update notification process ~p died: ~p", [Pid, Reason]),
View
2  src/couchdb/couch_event_sup.erl
@@ -61,7 +61,7 @@ terminate(_Reason, _State) ->
ok.
handle_call(_Whatever, _From, State) ->
- {ok, State}.
+ {reply, ok, State}.
handle_cast(stop, State) ->
{stop, normal, State}.
View
2  src/couchdb/couch_replication_notifier.erl
@@ -48,7 +48,7 @@ handle_event(Event, {Fun, Acc}) when is_function(Fun, 2) ->
{ok, {Fun, Acc2}}.
handle_call(_Msg, State) ->
- {reply, ok, State}.
+ {ok, ok, State}.
handle_info(_Msg, State) ->
{ok, State}.
View
6 src/lhttpc/lhttpc_manager.erl
@@ -124,7 +124,7 @@ init(Options) ->
true ->
% Make sure that the ssl random number generator is seeded
% This was new in R13 (ssl-3.10.1 in R13B vs. ssl-3.10.0 in R12B-5)
- ssl:seed(crypto:rand_bytes(255));
+ apply(ssl, seed, [crypto:rand_bytes(255)]);
false ->
ok
end,
@@ -218,9 +218,9 @@ terminate(_, State) ->
close_sockets(State#httpc_man.sockets).
%% @hidden
--spec code_change(any(), #httpc_man{}, any()) -> #httpc_man{}.
+-spec code_change(any(), #httpc_man{}, any()) -> {'ok', #httpc_man{}}.
code_change(_, State, _) ->
- State.
+ {ok, State}.
find_socket({_, _, Ssl} = Dest, Pid, State) ->
Dests = State#httpc_man.destinations,
View
4 src/lhttpc/lhttpc_sup.erl
@@ -35,9 +35,6 @@
-export([start_link/0]).
-export([init/1]).
--type child() :: {atom(), {atom(), atom(), list(any)},
- atom(), integer(), atom(), list(atom())}.
-
%% @spec () -> {ok, pid()} | {error, Reason}
%% Reason = atom()
%% @doc Starts and links to the supervisor.
@@ -49,7 +46,6 @@ start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
%% @hidden
--spec init(any()) -> {ok, {{atom(), integer(), integer()}, [child()]}}.
init(_) ->
LHTTPCManager = {lhttpc_manager, {lhttpc_manager, start_link, [[{name, lhttpc_manager}]]},
permanent, 10000, worker, [lhttpc_manager]
Please sign in to comment.
Something went wrong with that request. Please try again.