From b254a5e345211d317cbe4248456c772bbadf075c Mon Sep 17 00:00:00 2001 From: Kresten Krab Thorup Date: Mon, 24 Sep 2012 17:50:08 +0200 Subject: [PATCH] Remove some compiler warnings Add type information to the nursery structure --- src/hanoidb_nursery.erl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/hanoidb_nursery.erl b/src/hanoidb_nursery.erl index 8594223..20e5ef7 100644 --- a/src/hanoidb_nursery.erl +++ b/src/hanoidb_nursery.erl @@ -32,8 +32,16 @@ -include("hanoidb.hrl"). -include_lib("kernel/include/file.hrl"). --record(nursery, { log_file, dir, cache, total_size=0, count=0, - last_sync=now(), max_level, config=[], step=0, merge_done=0 }). +-record(nursery, { log_file :: file:fd(), + dir :: string(), + cache :: gb_tree(), + total_size=0 :: integer(), + count=0 :: integer(), + last_sync=now() :: erlang:timestamp(), + max_level :: integer(), + config=[] :: [{atom(), term()}], + step=0 :: integer(), + merge_done=0 :: integer()}). -spec new(string(), integer(), [_]) -> {ok, #nursery{}} | {error, term()}.