Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More dialyzer fixes. #552

Merged
merged 46 commits into from
Mar 4, 2014
Merged

More dialyzer fixes. #552

merged 46 commits into from
Mar 4, 2014

Conversation

cmeiklejohn
Copy link
Contributor

Fix a bunch of additional dialyzer errors, @seancribbs.

Resolves:

bounded_queue.erl:60: Expression produces a value of type [any()], but this value is unmatched
bounded_queue.erl:71: Expression produces a value of type [any()], but this value is unmatched
Resolves:

riak_repl_keylist_server.erl:146: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:149: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:190: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:202: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:211: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:238: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:244: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:322: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:344: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:380: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:389: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:411: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:470: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:517: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_server.erl:538: Expression produces a value of type ['ok' | {'error',_}], but this value is unmatched
riak_repl_keylist_client.erl:183: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_client.erl:273: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_client.erl:238: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_client.erl:239: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_repl_keylist_client.erl:250: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
Ignore the result.  However, we technically should be doing strict
matches on the calls, but given we don't know if all of these are
currently succeeding we can't validate the change without proper test
coverage.

Resolves:

riak_repl_keylist_server.erl:191: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:229: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:234: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:235: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:255: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:262: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:265: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:266: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_client.erl:104: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_client.erl:211: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_client.erl:212: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_client.erl:248: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_client.erl:249: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:191: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:229: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:234: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:235: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:255: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:262: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:265: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_keylist_server.erl:266: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:307: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched'
riak_repl_fullsync_helper.erl:228: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:235: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:91: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:92: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:205: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:206: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:209: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:210: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:224: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:228: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:293: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
riak_repl_fullsync_helper.erl:301: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
Resolves:

riak_repl_fullsync_worker.erl:160: Expression produces a value of type [any()], but this value is unmatched
Resolves:

riak_repl_fullsync_worker.erl:53: Expression produces a value of type ['ok' | {'error',_}], but this value is unmatched
Resolves:

riak_repl_keylist_server.erl:531: Expression produces a value of type 'ok' | 'skipped' | {'error',_}, but this value is unmatched
Resolves:

gen_leader.erl:436: Expression produces a value of type 'nop' | {[any()],[atom()]}, but this value is unmatched
Resolves:

gen_leader.erl:513: Expression produces a value of type {'error',_} | {'ok','cancel'}, but this value is unmatched
Resolves:

riak_repl_keylist_server.erl:370: Expression produces a value of type 'ok' | {_,'diff_resume'}, but this value is unmatched
Resolves:

riak_repl_client_sup.erl:18: Expression produces a value of type 'ok' | {'error','not_found' | 'simple_one_for_one'}, but this value is unmatched
Resolves:

riak_repl_cs.erl:127: Invalid type specification for function riak_repl_cs:bool_to_ok_or_cancel/1. The success typing is (boolean()) -> 'cancel' | 'ok'
riak_repl_console.erl:470: Expression produces a value of type ['ok'], but this value is unmatched
Resolves:

riak_repl_console.erl:441: Expression produces a value of type 'ok' | {'error','not_found' | 'restarting' | 'running' | 'simple_one_for_one'}, but this value is unmatched
Inline, and stop making look like a gen_server call.

Resolves:

riak_repl_migration.erl:53: Expression produces a value of type {'reply','error' | 'ok',#state{}}, but this value is unmatched
Resolves:

riak_repl_console.erl:416: Expression produces a value of type [any()], but this value is unmatched
Resolves:

riak_repl_console.erl:416: Expression produces a value of type [any()], but this value is unmatched
riak_repl_client_sup.erl:47: Expression produces a value of type [{'error',_} | {'ok','undefined' | pid()} | {'ok','undefined' | pid(),_}], but this value is unmatched
riak_repl_client_sup.erl:48: Expression produces a value of type ['ok' | {'error','not_found' | 'restarting' | 'running' | 'simple_one_for_one'}], but this value is unmatched
Resolves:

riak_repl_console.erl:435: Expression produces a value of type {'error',_} | {'ok','undefined' | pid()} | {'ok','undefined' | pid(),_}, but this value is unmatched
Resolves:

gen_leader.erl:586: Expression produces a value of type {'error',_} | {'ok','cancel'}, but this value is unmatched
Resolves:

gen_leader.erl:597: Expression produces a value of type [{'heartbeat',atom()}], but this value is unmatched
gen_leader.erl:814: Expression produces a value of type [{'checklead',atom()}], but this value is unmatched
Resolves:

gen_leader.erl:816: Expression produces a value of type {'error',_} | {'ok',timer:tref()}, but this value is unmatched
gen_leader.erl:847: Expression produces a value of type {'error',_} | {'ok','cancel'}, but this value is unmatched
Resolves:

gen_leader.erl:611: Expression produces a value of type 'ok' | {'heartbeat',pid()}, but this value is unmatched
Resolves:

gen_leader.erl:1127: Expression produces a value of type {'error',_} | {'ok','cancel'}, but this value is unmatched
gen_leader.erl:1344: Expression produces a value of type {'error',_} | {'ok',timer:tref()}, but this value is unmatched
Resolves:

riak_repl_bq.erl:118: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
Resolves:

riak_repl_app.erl:93: Expression produces a value of type [any()], but this value is unmatched
Resolves:

riak_repl_app.erl:135: Expression produces a value of type 'ignore' | [string()], but this value is unmatched
At this point, the ssl application will already be started because it is
a dependency of the riak_repl application.

Resolves:

riak_core_service_mgr.erl:305: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
riak_core_service_mgr.erl:347: Expression produces a value of type 'ok' | {'error',_}, but this value is unmatched
Resolves:

riak_core_service_mgr.erl:247: Expression produces a value of type [any()], but this value is unmatched
Resolves:

riak_repl_aae_source.erl:336: Expression produces a value of type 'ok' | pid(), but this value is unmatched
We never consume the result of the send after call; normalize return.

Resolves:

riak_core_cluster_mgr.erl:306: Expression produces a value of type 'ok' | reference(), but this value is unmatched
Resolves:

riak_core_cluster_mgr.erl:323: Expression produces a value of type 'ok' | {'error',_} | {'ok','undefined' | pid()} | {'ok','undefined' | pid(),_}, but this value is unmatched
Resolves:

riak_core_cluster_mgr.erl:380: Expression produces a value of type [{pid(),'poll_cluster'}], but this value is unmatched
Considering there are no direct consumers of this methods return value,
normalize it to always return ok.

Resolves:

riak_core_cluster_mgr.erl:613: Expression produces a value of type 'ok' | {'error',_} | {'ok','undefined' | pid()} | {'ok','undefined' | pid(),_}, but this value is unmatched
riak_core_cluster_mgr.erl:544: Expression produces a value of type 'ok' | {'error',_} | {'ok','undefined' | pid()} | {'ok','undefined' | pid(),_}, but this value is unmatched
riak_core_cluster_mgr.erl:551: Expression produces a value of type 'ok' | {'error',_} | {'ok','undefined' | pid()} | {'ok','undefined' | pid(),_}, but this value is unmatched
Resolves:

riak_core_cluster_mgr.erl:691: Expression produces a value of type 'ok' | ['ok'], but this value is unmatched
Resolves:

riak_repl2_rtq.erl:108: Expression produces a value of type atom() | tid(), but this value is unmatched
When lists:keytake fails, it returns false, not error.

Resolves:

riak_core_service_mgr.erl:258: The pattern 'error' can never match the type 'false' | {'value',tuple(),[tuple()]}
Resolves:

riak_core_service_mgr.erl:183: Expression produces a value of type 'ok' | {'error','not_found'}, but this value is unmatched
Resolves:

riak_core_connection.erl:144: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
@seancribbs seancribbs self-assigned this Mar 4, 2014
@cmeiklejohn
Copy link
Contributor Author

I think I addressed everything, is this 👍 to merge, @seancribbs?

@seancribbs
Copy link

Yep, 👍 to merge

cmeiklejohn added a commit that referenced this pull request Mar 4, 2014
@cmeiklejohn cmeiklejohn merged commit 7e40cd6 into develop Mar 4, 2014
@cmeiklejohn cmeiklejohn deleted the features/csm/dialyzer branch March 4, 2014 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants