aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edoc/src/edoc_lib.erl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2010-11-15 15:44:54 +0200
committerKostis Sagonas <[email protected]>2010-11-15 15:44:54 +0200
commite1f67dda7a9c2736f7b8d5d30fe84f2a2f39a8c1 (patch)
tree1e87864a13b04b776abc15b28ba66f19eff27b36 /lib/edoc/src/edoc_lib.erl
parent76378bb4a1a89d08b41d6f3df0edc6c26160bef7 (diff)
downloadotp-e1f67dda7a9c2736f7b8d5d30fe84f2a2f39a8c1.tar.gz
otp-e1f67dda7a9c2736f7b8d5d30fe84f2a2f39a8c1.tar.bz2
otp-e1f67dda7a9c2736f7b8d5d30fe84f2a2f39a8c1.zip
Fix various dialyzer warnings
Add appropriate specs to shut off dialyzer's no_return warnings and also fix an erroneous use of lists:concat/1 instead of lists:append/1.
Diffstat (limited to 'lib/edoc/src/edoc_lib.erl')
-rw-r--r--lib/edoc/src/edoc_lib.erl18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/edoc/src/edoc_lib.erl b/lib/edoc/src/edoc_lib.erl
index 5b7fb1e0d2..c1f95a7a67 100644
--- a/lib/edoc/src/edoc_lib.erl
+++ b/lib/edoc/src/edoc_lib.erl
@@ -288,11 +288,13 @@ parse_expr(S, L) ->
%% content in e.g.
%% <a href="overview-summary.html#mtag-author">`@author'</a> tags.
-%% @type info() = #info{name = string(),
-%% mail = string(),
-%% uri = string()}
+%% @type info() = #info{name = string(),
+%% email = string(),
+%% uri = string()}
--record(info, {name = "", email = "", uri = ""}).
+-record(info, {name = "" :: string(),
+ email = "" :: string(),
+ uri = "" :: string()}).
parse_contact(S, L) ->
I = scan_name(S, L, #info{}, []),
@@ -988,6 +990,14 @@ get_plugin(Key, Default, Opts) ->
%% ---------------------------------------------------------------------
%% Error handling
+-type line() :: erl_scan:line().
+-type err() :: 'eof'
+ | {'missing', char()}
+ | {line(), atom(), string()}
+ | string().
+
+-spec throw_error(err(), line()) -> no_return().
+
throw_error({missing, C}, L) ->
throw_error({"missing '~c'.", [C]}, L);
throw_error(eof, L) ->