hanoidb icon indicating copy to clipboard operation
hanoidb copied to clipboard

compiler and dialyzer warnings

Open norton opened this issue 13 years ago • 0 comments

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

norton avatar Sep 25 '12 13:09 norton