Skip to content

Commit

Permalink
Fix dialyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Håkan Huss committed Nov 30, 2017
1 parent ba84a57 commit 2f777b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
%% 'src': run Dialyzer on the source files as in 'dialyzer --src'
%% {warnings, [WarnOpts]}: turn on/off Dialyzer warnings
{dialyzer_opts, [{plt, "erlsom.plt"},
{warnings, [no_return, race_conditions, underspecs, behaviours]},
{warnings, [race_conditions]},
src]}.
{eunit_opts, [verbose]}.
{cover_enabled, true}.
2 changes: 1 addition & 1 deletion src/erlsom.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
%% prefix=the prefix that will be used in the result
-record(ns, {uri,
prefix,
efd :: qualified | unqualified % elementFormDefault
efd = unqualified :: qualified | unqualified % elementFormDefault
}).
-record(qname, {uri, localPart, prefix, mappedPrefix}).
8 changes: 4 additions & 4 deletions src/erlsom_compile.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
%% path is used to give local elements a unique name (the 'path' to the element)
-record(schemaInfo, {targetNamespace, elementFormDefault, namespacePrefix, namespaces,
path=[], attGrps, atts, th,
strict :: boolean(), %% enforce additional type checks/conversions
include_any_attrs = false, %% if true, the second element in the result
%% types will be used for
%% atributes that were not explicitly declared
strict = false :: boolean(), %% enforce additional type checks/conversions
include_any_attrs = false, %% if true, the second element in the result
%% types will be used for
%% atributes that were not explicitly declared
value_fun %% Function that is called after the parsing
%% of a complex type (resulting in creation of a
%% record) has been created. Can be used
Expand Down
2 changes: 1 addition & 1 deletion src/erlsom_type2xsd.erl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type_to_xsd(String, XsdFile, Options) ->
%% The forms must be records ({attribute, record, _, {Name, Fields}}) or
%% the special attributes that can be used to specify things like the
%% target namespace etc.
-spec translate_forms(XSD_forms::form(), Options::option()) -> string().
-spec translate_forms(XSD_forms::form(), Options::[option()]) -> #schemaType{}.
translate_forms(Forms, Options) ->
Tns = proplists:get_value('target_namespace', Options, {"TargetNamespace", "tns"}),
#state{elements = Elements, types = Types, ns = Tns2} =
Expand Down

0 comments on commit 2f777b4

Please sign in to comment.