compiler and dialyzer warnings #15

Open
opened 2012-09-25 13:37:12 +00:00 by norton · 0 comments
norton commented 2012-09-25 13:37:12 +00:00 (Migrated from github.com)

There are some compiler and dialyzer warnings that would be nice to fix. As time permits, I may also try to fix some of these.

compiler warnings:

src/hanoidb_fold_worker.erl:71: Warning: record state has field(s) without type     
src/hanoidb_level.erl:53: Warning: record state has field(s) without type information
src/basho_bench_driver_hanoidb.erl:27: Warning: record state has field(s) without type information
src/basho_bench_driver_hanoidb.erl:79: Warning: variable 'SyncInterval' exported from 'case' (

dialyzer Unknown functions:
hanoidb_utils:has_expired/1

dialyzer "nospec" warnings:
.... too many to list ....

I often find the following 2 passes of dialyzer to be quite helpful: first with no_spec and next with unmatched_returns.

diff --git a/Makefile b/Makefile
index 5071ea4..09ced93 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,13 @@ plt: compile
 analyze: compile
        $(DIALYZER) --plt .hanoi.plt \
        -pa deps/plain_fsm/ebin \
+       -Wunmatched_returns \
+       ebin
+
+analyze-nospec: compile
+       $(DIALYZER) --plt .hanoi.plt \
+       -pa deps/plain_fsm/ebin \
+       --no_spec \
        ebin
There are some compiler and dialyzer warnings that would be nice to fix. As time permits, I may also try to fix some of these. compiler warnings: ``` src/hanoidb_fold_worker.erl:71: Warning: record state has field(s) without type src/hanoidb_level.erl:53: Warning: record state has field(s) without type information src/basho_bench_driver_hanoidb.erl:27: Warning: record state has field(s) without type information src/basho_bench_driver_hanoidb.erl:79: Warning: variable 'SyncInterval' exported from 'case' ( ``` dialyzer Unknown functions: hanoidb_utils:has_expired/1 dialyzer "nospec" warnings: .... too many to list .... I often find the following 2 passes of dialyzer to be quite helpful: first with no_spec and next with unmatched_returns. ``` diff --git a/Makefile b/Makefile index 5071ea4..09ced93 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,13 @@ plt: compile analyze: compile $(DIALYZER) --plt .hanoi.plt \ -pa deps/plain_fsm/ebin \ + -Wunmatched_returns \ + ebin + +analyze-nospec: compile + $(DIALYZER) --plt .hanoi.plt \ + -pa deps/plain_fsm/ebin \ + --no_spec \ ebin ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/hanoidb#15
No description provided.